CUIB010301.cs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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 Core.LZMes.Client.UIF;
  12. namespace Core.LZMes.Client.QCM
  13. {
  14. public partial class CUIB010301 : FrmBase
  15. {
  16. public CUIB010301()
  17. {
  18. InitializeComponent();
  19. }
  20. private void CUIB010301_Load(object sender, EventArgs e)
  21. {
  22. //this.ultraComboEditor1.SelectedIndex = 0;
  23. }
  24. public override void ToolBar_Click(object sender, string ToolbarKey)
  25. {
  26. switch (ToolbarKey)
  27. {
  28. case "Query":
  29. this.DoQuery();
  30. break;
  31. }
  32. }
  33. private void ultraComboEditor1_TextChanged(object sender, EventArgs e)
  34. {
  35. //获取满足条件的所有合同号
  36. //CoreClientParam ccp = new CoreClientParam();
  37. //ArrayList al = new ArrayList();
  38. //al.Add("CUIB010301_01.SELECT");
  39. //al.Add(this.ultraComboEditor1.Text);
  40. //ccp.ServerName = "UIB.COM.ComDBQuery";
  41. //ccp.MethodName = "doSimpleQuery";
  42. //ccp.ServerParams = new object[] { al };
  43. //ccp.SourceDataTable = this.dataSet1.Tables[0];
  44. //this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  45. //
  46. //this.comboBoxOrdNO.DataSource = this.dataSet1.Tables[0].DefaultView;
  47. //for (int i = 0; i < this.dataSet1.Tables[0].Rows.Count; i++)
  48. //{
  49. // this.comboBoxOrdNO.Items.Add(this.dataSet1.Tables[0].Rows[i][0].ToString());
  50. //}
  51. }
  52. public void DoQuery()
  53. {
  54. try
  55. {
  56. CoreClientParam ccp = new CoreClientParam();
  57. ArrayList list = new ArrayList();
  58. ArrayList al = new ArrayList();
  59. al.Add("UIB010301_01.SELECT");//总
  60. al.Add(this.textBoORD.Text);
  61. al.Add(this.textBoxSEQ.Text);
  62. list.Add(al);
  63. //成分
  64. al = new ArrayList();//单一元素
  65. al.Add("UIB010301_CHEM_01.SELECT");
  66. al.Add(this.textBoORD.Text);
  67. al.Add(this.textBoxSEQ.Text);
  68. list.Add(al);
  69. al = new ArrayList();//复合成分
  70. al.Add("UIB010301_CHEM_02.SELECT");
  71. al.Add(this.textBoORD.Text);
  72. al.Add(this.textBoxSEQ.Text);
  73. list.Add(al);
  74. //材质
  75. al = new ArrayList();//检验项目
  76. al.Add("UIB010301_QLTY_012.SELECT");
  77. al.Add(this.textBoORD.Text);
  78. al.Add(this.textBoxSEQ.Text);
  79. list.Add(al);
  80. al = new ArrayList();//取样信息
  81. al.Add("UIB010301_QLTY_02N.SELECT");
  82. al.Add(this.textBoORD.Text + this.textBoxSEQ.Text);
  83. //al.Add(this.textBoxSEQ.Text);
  84. list.Add(al);
  85. al = new ArrayList();//交付条件
  86. al.Add("UIB010301_DEL_01.SELECT");
  87. al.Add(this.textBoORD.Text);
  88. al.Add(this.textBoxSEQ.Text);
  89. list.Add(al);
  90. al = new ArrayList();//炼钢规范
  91. al.Add("UIB010301_SMS_01.SELECT");
  92. al.Add(this.textBoORD.Text);
  93. al.Add(this.textBoxSEQ.Text);
  94. list.Add(al);
  95. al = new ArrayList();//热轧规范
  96. al.Add("UIB010301_MILL_01.SELECT");
  97. al.Add(this.textBoORD.Text);
  98. al.Add(this.textBoxSEQ.Text);
  99. list.Add(al);
  100. al = new ArrayList();//冷轧规范
  101. al.Add("UIB010301_COLD_01.SELECT");
  102. al.Add(this.textBoORD.Text);
  103. al.Add(this.textBoxSEQ.Text);
  104. list.Add(al);
  105. ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
  106. ccp.MethodName = "doContinuousQluery";
  107. ccp.ServerParams = new object[] { list };
  108. CoreClientParam ccpList = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
  109. if (ccpList.ReturnInfo.Length == 0)
  110. {
  111. ArrayList aList = ccpList.ReturnObject as ArrayList;
  112. if (aList[0] != null)
  113. {
  114. this.dataSet1.Tables["TOTAL"].Clear();
  115. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[0] as ArrayList, this.dataSet1.Tables["TOTAL"]);
  116. tab0.TableName = "TOTAL";
  117. this.dataSet1.Tables["TOTAL"].Merge(tab0);
  118. }
  119. if (aList[1] != null)//单一元素
  120. {
  121. this.dataSet1.Tables["SCHEM"].Clear();
  122. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[1] as ArrayList, this.dataSet1.Tables["SCHEM"]);
  123. tab0.TableName = "SCHEM";
  124. this.dataSet1.Tables["SCHEM"].Merge(tab0);
  125. }
  126. if (aList[2] != null)//复合元素
  127. {
  128. this.dataSet1.Tables["CCHEM"].Clear();
  129. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[2] as ArrayList, this.dataSet1.Tables["CCHEM"]);
  130. tab0.TableName = "CCHEM";
  131. this.dataSet1.Tables["CCHEM"].Merge(tab0);
  132. }
  133. if (aList[3] != null)//材质项目
  134. {
  135. this.dataSet1.Tables["QLTY"].Clear();
  136. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[3] as ArrayList, this.dataSet1.Tables["QLTY"]);
  137. tab0.TableName = "QLTY";
  138. this.dataSet1.Tables["QLTY"].Merge(tab0);
  139. }
  140. if (aList[4] != null)//取样信息
  141. {
  142. this.dataSet1.Tables["LOT"].Clear();
  143. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[4] as ArrayList, this.dataSet1.Tables["LOT"]);
  144. tab0.TableName = "LOT";
  145. this.dataSet1.Tables["LOT"].Merge(tab0);
  146. }
  147. if (aList[5] != null)//交付条件
  148. {
  149. this.dataSet1.Tables["DEL"].Clear();
  150. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[5] as ArrayList, this.dataSet1.Tables["DEL"]);
  151. tab0.TableName = "DEL";
  152. this.dataSet1.Tables["DEL"].Merge(tab0);
  153. }
  154. if (aList[6] != null)//炼钢规范
  155. {
  156. this.dataSet1.Tables["SMS"].Clear();
  157. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[6] as ArrayList, this.dataSet1.Tables["SMS"]);
  158. tab0.TableName = "SMS";
  159. this.dataSet1.Tables["SMS"].Merge(tab0);
  160. }
  161. if (aList[7] != null)//热轧规范
  162. {
  163. this.dataSet1.Tables["MILL"].Clear();
  164. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[7] as ArrayList, this.dataSet1.Tables["MILL"]);
  165. tab0.TableName = "MILL";
  166. this.dataSet1.Tables["MILL"].Merge(tab0);
  167. }
  168. if (aList[8] != null)//冷轧规范
  169. {
  170. this.dataSet1.Tables["COLD"].Clear();
  171. System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[8] as ArrayList, this.dataSet1.Tables["COLD"]);
  172. tab0.TableName = "COLD";
  173. this.dataSet1.Tables["COLD"].Merge(tab0);
  174. }
  175. }
  176. else
  177. {
  178. return;
  179. }
  180. //ccp.SourceDataTable = this.dataSet2.Tables[0];
  181. //this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  182. //for (int i = 0; i < this.dataSet1.Tables[0].Columns.Count; i++ )
  183. //{
  184. if (this.dataSet1.Tables["TOTAL"].Rows.Count > 0)
  185. {
  186. this.textBoxProgCD.Text = this.dataSet1.Tables[0].Rows[0]["ORD_PROG_CD"].ToString();//订单进程
  187. this.textBoxPROD_LINE.Text = this.dataSet1.Tables[0].Rows[0]["PROD_LINE"].ToString();//产线
  188. this.textBox1ORD_DEVLMT_DATE.Text = this.dataSet1.Tables[0].Rows[0]["ORD_DEVLMT_DATE"].ToString();//交货期
  189. this.textBox1DSN_CMT_DATE.Text = this.dataSet1.Tables[0].Rows[0]["DSN_CMT_DATE"].ToString();//品质设计日期
  190. this.textBoxSMS_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["SMS_STD_NO"].ToString();//炼钢规范
  191. this.textBoxMILL_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["MILL_STD_NO"].ToString();//热轧规范
  192. this.textBoxCOLD_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["COLD_STD_NO"].ToString();//冷轧规范
  193. this.textBoxCUST_SPEC_NO.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO"].ToString();//客户参数号
  194. this.textBoxCUST_SPEC_NO_INGR.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_INGR"].ToString();//成分客户参数号
  195. this.textBoxCUST_SPEC_NO_QLTY.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_QLTY"].ToString();//材质客户参数号
  196. this.textBoxCUST_SPEC_NO_DEL.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_DEL"].ToString();//交付客户参数号
  197. this.textBoxCUST_NM.Text = this.dataSet1.Tables[0].Rows[0]["CUST_NM"].ToString();//客户名
  198. this.textBoxORD_THK.Text = this.dataSet1.Tables[0].Rows[0]["ORD_THK"].ToString();//热轧厚度
  199. this.textBoxORD_WTH.Text = this.dataSet1.Tables[0].Rows[0]["ORD_WTH"].ToString();//热轧宽度
  200. this.textBoxPRDNM_CD.Text = this.dataSet1.Tables[0].Rows[0]["PRDNM_CD"].ToString();//热轧交货状态
  201. this.textBoxORD_USE_TP.Text = this.dataSet1.Tables[0].Rows[0]["ORD_USE_TP"].ToString();//热卷订单用途
  202. this.textBoxSPEC_ABBSYM.Text = this.dataSet1.Tables[0].Rows[0]["SPEC_ABBSYM"].ToString();//标准号
  203. this.textBoxSPEC_STL_GRD.Text = this.dataSet1.Tables[0].Rows[0]["SPEC_STL_GRD"].ToString();//标准牌号
  204. this.textBoxC_ORD_THK.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_THK"].ToString();//冷卷厚度
  205. this.textBoxC_ORD_WTH.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_WTH"].ToString();//冷卷宽度
  206. this.textBoxC_PRDNM_CD.Text = this.dataSet1.Tables[0].Rows[0]["C_PRDNM_CD"].ToString();//冷卷交货状态
  207. this.textBoxC_ORD_USE_TP.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_USE_TP"].ToString();//冷卷交货状态
  208. this.textBoxC_SPEC_ABBSYM.Text = this.dataSet1.Tables[0].Rows[0]["C_SPEC_ABBSYM"].ToString();//冷卷订单用途
  209. this.textBoxC_SPEC_STL_GRD.Text = this.dataSet1.Tables[0].Rows[0]["C_SPEC_STL_GRD"].ToString();//冷卷标准牌号
  210. this.textBoxEDGE_PROC_YN.Text = this.dataSet1.Tables[0].Rows[0]["EDGE_PROC_YN"].ToString();//是否切边
  211. this.textBoxPAKMTH_TP.Text = this.dataSet1.Tables[0].Rows[0]["PAKMTH_TP"].ToString();//包装方式
  212. this.textBoxWgtMin.Text = this.dataSet1.Tables[0].Rows[0]["PROD_WGT_MIN"].ToString();//最小重量
  213. this.textBoxWgtMax.Text = this.dataSet1.Tables[0].Rows[0]["PROD_WGT_MAX"].ToString();//最大重量
  214. this.textBoxExp.Text = this.dataSet1.Tables[0].Rows[0]["C_EXTSHAPE_REQ"].ToString();//外观等级
  215. this.textBoxLincense.Text = this.dataSet1.Tables[0].Rows[0]["LICENSE_NO"].ToString();//许可证号
  216. this.textBoxSize.Text = this.dataSet1.Tables[0].Rows[0]["SUAN_SIZE"].ToString();//酸轧控制公差带 textBoxtuy
  217. this.textBoxtuy.Text = this.dataSet1.Tables[0].Rows[0]["OIL_DEF"].ToString();//涂油代码
  218. }
  219. }
  220. catch (System.Exception ex)
  221. {
  222. System.Diagnostics.Debug.WriteLine(ex.ToString());
  223. }
  224. //}
  225. }
  226. public string OrderNO
  227. {
  228. set
  229. {
  230. this.textBoORD.Text = value;
  231. }
  232. }
  233. public string OrderSEQ
  234. {
  235. set
  236. {
  237. textBoxSEQ.Text = value;
  238. DoQuery();
  239. }
  240. }
  241. private void textBoxSEQ_KeyDown(object sender, KeyEventArgs e)
  242. {
  243. try
  244. {
  245. if (e.KeyCode == Keys.Enter)
  246. {
  247. this.DoQuery();
  248. }
  249. }
  250. catch (Exception ex)
  251. {
  252. System.Diagnostics.Debug.WriteLine(ex.ToString());
  253. }
  254. }
  255. private void textBoORD_KeyDown(object sender, KeyEventArgs e)
  256. {
  257. try
  258. {
  259. if (e.KeyCode == Keys.Tab)
  260. {
  261. this.textBoxSEQ.Focus();
  262. }
  263. }
  264. catch (Exception ex)
  265. {
  266. System.Diagnostics.Debug.WriteLine(ex.ToString());
  267. }
  268. }
  269. }
  270. }