f8e700a5771d4f487163099c62c43bff2eb80cf0.svn-base 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using System.Collections;
  11. using Infragistics.Win.UltraWinGrid;
  12. namespace Core.LZMes.Client.QCM
  13. {
  14. public partial class QCM0304 : FrmBase
  15. {
  16. public QCM0304()
  17. {
  18. InitializeComponent();
  19. }
  20. public override void ToolBar_Click(object sender, string ToolbarKey)
  21. {
  22. switch (ToolbarKey)
  23. {
  24. case "Query":
  25. this.DoQuery();
  26. break;
  27. case "Exit":
  28. this.Close();
  29. break;
  30. }
  31. }
  32. private void DoQuery()
  33. {
  34. string sbatchno = "";
  35. string ebatchno = "";
  36. string orderno = "";// 订单号
  37. string psc = ""; //产品描述
  38. CoreClientParam ccp = new CoreClientParam();
  39. switch (this.ultraTabControl1.SelectedTab.Index)
  40. {
  41. case 0:
  42. this.dataSet1.Tables[0].Clear();
  43. sbatchno = this.textBox1.Text.Trim();
  44. ebatchno = this.textBox2.Text.Trim();
  45. orderno = this.textBox3.Text.Trim();// 订单号
  46. psc = textBox4.Text.Trim(); //产品描述
  47. ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
  48. ccp.MethodName = "doQueryMaterialWeb";
  49. ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"), this.dateTimePicker2.Value.ToString("yyyyMMdd"), sbatchno, ebatchno, orderno, psc ,"T"};
  50. ccp.SourceDataTable = this.dataSet1.Tables[0];
  51. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  52. if (ccp.ReturnCode == -1)
  53. MessageBox.Show(ccp.ReturnInfo);
  54. break;
  55. case 1:
  56. this.dataSet2.Tables[0].Clear();
  57. sbatchno = this.textBox1.Text.Trim();
  58. ebatchno = this.textBox2.Text.Trim();
  59. orderno = this.textBox3.Text.Trim();// 订单号
  60. psc = textBox4.Text.Trim(); //产品描述
  61. ccp.ServerName = "QCM.QCM03.QCM0304.QcmJudgeDefectionServiceImpl";
  62. ccp.MethodName = "QueryDefection";
  63. ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"),this.dateTimePicker2.Value.ToString("yyyyMMdd"),sbatchno,ebatchno, orderno, psc };
  64. ccp.SourceDataTable = this.dataSet2.Tables[0];
  65. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  66. if (ccp.ReturnCode == -1)
  67. MessageBox.Show(ccp.ReturnInfo);
  68. break;
  69. default:
  70. return;
  71. }
  72. }
  73. private void button1_Click(object sender, EventArgs e)
  74. {
  75. foreach (UltraGridRow ugr in this.ultraGrid2.Rows)
  76. {
  77. ArrayList list = new ArrayList();
  78. if(ugr.Cells["CHECK"].Text.ToString() == "True")
  79. {
  80. //list.Add
  81. }
  82. }
  83. }
  84. private void QCM0304_Load(object sender, EventArgs e)
  85. {
  86. //CoreClientParam ccp = new CoreClientParam();
  87. //ccp.ServerName = "QCM.QCM03.QCM0304.QcmJudgeDefectionServiceImpl";
  88. //ccp.MethodName = "QueryQcmDetection";
  89. //ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  90. //ArrayList list = (ArrayList)(ccp.ReturnObject);
  91. //if (list != null)
  92. //{
  93. // int listSize = list.Count;
  94. // Infragistics.Win.ValueListItem[] valueListItems = new Infragistics.Win.ValueListItem[listSize];
  95. // for (int i = 0; i < listSize; i++)
  96. // {
  97. // Infragistics.Win.ValueListItem item = new Infragistics.Win.ValueListItem();
  98. // Hashtable ht = (Hashtable)list[i];
  99. // item.DataValue = ht["DETECTION_CODE"].ToString();
  100. // item.DisplayText = ht["DETECTION_NAME"].ToString();
  101. // valueListItems[i] = item;
  102. // }
  103. // this.comboBox2.Items.AddRange(valueListItems);
  104. //}
  105. }
  106. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  107. {
  108. try
  109. {
  110. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  111. if (ugr == null)
  112. return;
  113. this.dataSet3.Clear();
  114. string batchno = ugr.Cells["BATCHNO"].Value.ToString();
  115. string planno = ugr.Cells["PLAN_NO"].Value.ToString();
  116. string design_key = textBox3.Text.Trim();
  117. string psc = textBox4.Text.Trim();
  118. CoreClientParam ccp = new CoreClientParam();
  119. ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
  120. ccp.MethodName = "doQueryMaterialDetail";
  121. ccp.ServerParams = new object[] { batchno, planno, "T" };
  122. ccp.SourceDataTable = this.dataSet3.Tables[0];
  123. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  124. if (ccp.ReturnCode == -1)
  125. MessageBox.Show(ccp.ReturnInfo);
  126. }
  127. catch (Exception ex)
  128. {
  129. System.Diagnostics.Debug.WriteLine(ex.ToString());
  130. MessageBox.Show("系统出错,请联系管理人员", "警告");
  131. }
  132. }
  133. }
  134. }