| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- 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 QCM0106JHY : FrmBase
- {
- public QCM0106JHY()
- {
- 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)
- {
- }
-
- }
- }
|