| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- 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 QCM030401 : FrmBase
- {
- public QCM030401()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Exit":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- string sbatchno = "";
- string ebatchno = "";
- string orderno = "";// 订单号
- string psc = ""; //产品描述
- CoreClientParam ccp = new CoreClientParam();
- switch (this.ultraTabControl1.SelectedTab.Index)
- {
- case 0:
- this.dataSet1.Tables[0].Clear();
- sbatchno = this.textBox1.Text.Trim();
- ebatchno = this.textBox2.Text.Trim();
- orderno = this.textBox3.Text.Trim();// 订单号
- psc = textBox4.Text.Trim(); //产品描述
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "doQueryMaterialWeb";
- ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"), this.dateTimePicker2.Value.ToString("yyyyMMdd"), sbatchno, ebatchno, orderno, psc ,"T"};
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- MessageBox.Show(ccp.ReturnInfo);
- break;
- case 1:
- this.dataSet2.Tables[0].Clear();
- sbatchno = this.textBox1.Text.Trim();
- ebatchno = this.textBox2.Text.Trim();
- orderno = this.textBox3.Text.Trim();// 订单号
- psc = textBox4.Text.Trim(); //产品描述
- ccp.ServerName = "QCM.QCM03.QCM0304.QcmJudgeDefectionServiceImpl";
- ccp.MethodName = "QueryDefection";
- ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"),this.dateTimePicker2.Value.ToString("yyyyMMdd"),sbatchno,ebatchno, orderno, psc };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- MessageBox.Show(ccp.ReturnInfo);
- break;
- default:
- return;
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- foreach (UltraGridRow ugr in this.ultraGrid2.Rows)
- {
- ArrayList list = new ArrayList();
- if(ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- //list.Add
- }
- }
- }
- private void QCM0304_Load(object sender, EventArgs e)
- {
- //CoreClientParam ccp = new CoreClientParam();
- //ccp.ServerName = "QCM.QCM03.QCM0304.QcmJudgeDefectionServiceImpl";
- //ccp.MethodName = "QueryQcmDetection";
- //ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- //ArrayList list = (ArrayList)(ccp.ReturnObject);
- //if (list != null)
- //{
- // int listSize = list.Count;
- // Infragistics.Win.ValueListItem[] valueListItems = new Infragistics.Win.ValueListItem[listSize];
- // for (int i = 0; i < listSize; i++)
- // {
- // Infragistics.Win.ValueListItem item = new Infragistics.Win.ValueListItem();
- // Hashtable ht = (Hashtable)list[i];
- // item.DataValue = ht["DETECTION_CODE"].ToString();
- // item.DisplayText = ht["DETECTION_NAME"].ToString();
- // valueListItems[i] = item;
- // }
- // this.comboBox2.Items.AddRange(valueListItems);
- //}
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- return;
- this.dataSet3.Clear();
- string batchno = ugr.Cells["BATCHNO"].Value.ToString();
- string planno = ugr.Cells["PLAN_NO"].Value.ToString();
- string design_key = textBox3.Text.Trim();
- string psc = textBox4.Text.Trim();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "doQueryMaterialDetail";
- ccp.ServerParams = new object[] { batchno, planno, "T" };
- ccp.SourceDataTable = this.dataSet3.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- MessageBox.Show(ccp.ReturnInfo);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- }
- }
|