| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.YdmStuffManage.Entity;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.YdmStuffManage
- {
- public partial class FrmYdmGpInitialManage : FrmBase
- {
- public FrmYdmGpInitialManage()
- {
- InitializeComponent();
- }
- private void FrmYdmGpInitialManage_Load(object sender, EventArgs e)
- {
- DateTime d1 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
- this.StartTime.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM"));
- EntityHelper.ShowGridCaption<YdmGpInitialEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- doQuery();
- break;
-
- case "Export":
- exportData();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- private void doQuery()
- {
- string bathYear = "";
- string judgeNo = "";
- string belongCode = "";
- if (this.chkTim.Checked)
- {
- bathYear = this.StartTime.Value.ToString("yyyyMM");
- }
- if (this.chkJugeHeatNo.Checked && this.txtJugeNo.Text.Trim() != "")
- {
- judgeNo = this.txtJugeNo.Text.Trim();
- }
- //if (this.chkBelong.Checked && this.cmbBelong.Text != "")
- //{
- // belongCode = this.cmbBelong.Value.ToString();
- //}
- ArrayList parmList = new ArrayList();
- parmList.Add(bathYear);
- parmList.Add(judgeNo);
- parmList.Add(belongCode);
- List<YdmGpInitialEntity> listSource = EntityHelper.GetData<YdmGpInitialEntity>(
- "Core.LgMes.Server.Stuffmanage.FrmYdmGpInitialManage.doQuery", new object[] { parmList }, this.ob);
- bindingSource2.DataSource = listSource;
-
- }
-
- /// <summary>
- /// 导出
- /// </summary>
- private void exportData()
- {
- GridHelper.ulGridToExcel(ultraGrid1, "管坯期初数据");
- }
- private void chkJugeHeatNo_CheckedChanged(object sender, EventArgs e)
- {
- this.txtJugeNo.Enabled = this.chkJugeHeatNo.Checked;
- }
- private void chkTim_CheckedChanged(object sender, EventArgs e)
- {
- this.StartTime.Enabled = this.chkTim.Checked;
- }
- }
- }
|