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 System.Collections; using Infragistics.Win.UltraWinGrid; namespace Core.LZMes.Client.QCM { public partial class QCM0106 : FrmBase { public QCM0106() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; } } private void DoQuery() { //查询 try { this.dataSet1.Clear(); string starttime = ""; string endtime = ""; if (checkBox2.Checked) { starttime = this.dateTimePicker1.Value.ToString("yyyyMMdd"); endtime = this.dateTimePicker2.Value.ToString("yyyyMMdd"); } string sbatchno = ""; string ebatchno = ""; if (checkBox3.Checked) { sbatchno = this.textBox1.Text.Trim(); if (textBox2.Text.ToString() == "") { ebatchno = this.textBox1.Text.Trim(); } else { ebatchno = this.textBox2.Text.Trim(); } } if (!checkBox2.Checked && !checkBox3.Checked) { MessageBox.Show("时间与轧批号必须选择其中一个条件!"); return; } string prod_line = ""; if (this.comboBox3.Text.ToString() == "热连轧") { prod_line = "RZ1"; } else if (this.comboBox3.Text.ToString() == "连退") { prod_line = "LT1"; } else if (this.comboBox3.Text.ToString() == "酸轧") { prod_line = "SZ1"; } else if (this.comboBox3.Text.ToString() == "中板线") { prod_line = "ZB1"; } else if (this.comboBox3.Text.ToString() == "厚板线") { prod_line = "HB1"; } else if (this.comboBox3.Text.ToString() == "高棒") { prod_line = "GX1"; } else if (this.comboBox3.Text.ToString() == "高线") { prod_line = "GX2"; } else if (this.comboBox3.Text.ToString() == "棒二") { prod_line = "BC2"; } CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect"; ccp.MethodName = "Query"; ccp.ServerParams = new object[] { starttime, endtime, prod_line, sbatchno, ebatchno }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void ultraGrid1_AfterRowActivate(object sender, EventArgs e) { } } }