using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using com.steering.mes.zgmil.entity; using Infragistics.Win.UltraWinGrid; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.ZGMil.NodeResultQuery; using Core.StlMes.Client.ZGMil.Entity; using System.Collections; namespace Core.StlMes.Client.ZGMil.Result { public partial class FrmZPResultQuery : FrmBase { #region 初始化 public FrmZPResultQuery() { InitializeComponent(); } /// /// 初始化控件 /// private void InitControl() { } /// /// checkbox更改事件 /// /// /// private void chkBox_CheckedChanged(object sender, EventArgs e) { if (chkDate.Checked == true) { dtStartTime.Enabled = true; dtEndTime.Enabled = true; } else { dtStartTime.Enabled = false; dtEndTime.Enabled = false; } if (chkLotNo.Checked == true) { this.txtLotNo.Enabled = true; } else { txtLotNo.Enabled = false; } if (chkJudgeStoveNo.Checked == true) { this.txtJudgeStoveNo.Enabled = true; } else { txtJudgeStoveNo.Enabled = false; } if (chkSimpleNo.Checked == true) { // txtSimpleNo.Enabled == true; } else { // txtSimpleNo.Enabled == false; } if (chkGroupNo.Checked == true) { // txtGroupNo.Enabled == true; } else { // txtGroupNo.Enabled == false; } } #endregion #region 事件 方法 /// /// 刷新 /// private void Refresh() { } /// /// toolbar按钮 /// /// /// public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": Query(); break; } } /// /// 查询 /// private void Query() { MilOfflineGroupEntity GroupingResultQuery = new MilOfflineGroupEntity(); MilOfflineGroupResumeEntity GroupingDetailQuery = new MilOfflineGroupResumeEntity(); if (chkLotNo.Checked) { if (string.IsNullOrEmpty(txtLotNo.Text)) { MessageBox.Show("请输入需查询的生产批号!!!"); return; } else { GroupingResultQuery.ZpLotNo = txtLotNo.Text; } } else { GroupingResultQuery.ZpLotNo = ""; } if (this.chkJudgeStoveNo.Checked) { if (string.IsNullOrEmpty(txtJudgeStoveNo.Text)) { MessageBox.Show("请输入需查询的炉号!!!"); return; } else { GroupingResultQuery.ZpJudgeStoveNo = txtJudgeStoveNo.Text; } } else { GroupingResultQuery.ZpJudgeStoveNo = ""; } if (this.chkSimpleNo.Checked) { if (string.IsNullOrEmpty(this.txtSimpleNo.Text)) { MessageBox.Show("请输入需查询的性能批号!!!"); return; } else { GroupingDetailQuery.SimpleLotNo = txtSimpleNo.Text; } } else { GroupingDetailQuery.SimpleLotNo = ""; } if (this.chkGroupNo.Checked) { if (string.IsNullOrEmpty(this.txtGroupNo.Text)) { MessageBox.Show("请输入需查询的性能批组号!!!"); return; } else { GroupingDetailQuery.GroupNo = txtGroupNo.Text; } } else { GroupingDetailQuery.GroupNo = ""; } // DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmZPResult.GroupResultQuery", new object[] { GroupingResultQuery, EndTime }, this.ob); // GridHelper.CopyDataToDatatable(ref dt, ref dtZPResult, true); // DataTable dt1 = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmZPResult.GroupResumeQuery", new object[] { OffLineResultQuery, EndTime }, this.ob); // GridHelper.CopyDataToDatatable(ref dt, ref dtZPResult, true); // } #endregion } }