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(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; } } /// /// 查询 /// 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 listSource = EntityHelper.GetData( "Core.LgMes.Server.Stuffmanage.FrmYdmGpInitialManage.doQuery", new object[] { parmList }, this.ob); bindingSource2.DataSource = listSource; } /// /// 导出 /// 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; } } }