UIB030250.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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 Infragistics.Win.UltraWinGrid;
  11. using System.Collections;
  12. using System.Diagnostics;
  13. namespace Core.LZMes.Client.UIB
  14. {
  15. public partial class UIB030250 : FrmBase
  16. {
  17. public UIB030250()
  18. {
  19. InitializeComponent();
  20. }
  21. public override void ToolBar_Click(object sender, string ToolbarKey)
  22. {
  23. switch (ToolbarKey)
  24. {
  25. case "Query":
  26. this.DoQuery();
  27. break;
  28. case "Save":
  29. this.DoSave();
  30. break;
  31. }
  32. }
  33. public void DoQuery()
  34. {
  35. try
  36. {
  37. ArrayList al = new ArrayList();
  38. if (this.comboBox3.Text == "连退")
  39. {
  40. al.Add("UIB030230_YC.SELECT");
  41. }
  42. else
  43. {
  44. al.Add("UIB030240_YC.SELECT");
  45. }
  46. al.Add(this.textBox3_COILNO.Text.Trim());
  47. this.dataSet1.Tables[0].Clear();
  48. CoreClientParam ccp = new CoreClientParam();
  49. ccp.ServerName = "UIB.COM.ComDBQuery";
  50. ccp.MethodName = "doSimpleQuery";
  51. ccp.ServerParams = new object[] { al };
  52. ccp.SourceDataTable = this.dataSet1.Tables[0];
  53. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  54. }
  55. catch (Exception ex)
  56. {
  57. }
  58. }
  59. public void DoSave()
  60. {
  61. try
  62. {
  63. string mesge = "";
  64. if (this.ultraTabControl1.Tabs[0].Selected)//标准牌号改判
  65. {
  66. mesge = "确定按牌号对该卷进行改判操作吗?改判后标准牌号等信息将被替换!";
  67. }
  68. else
  69. {
  70. mesge = "确定按选择合同订单要求对该卷进行改判操作吗?";
  71. }
  72. if (MessageBox.Show(mesge, "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
  73. return;
  74. //改判
  75. if (this.ultraGrid1.ActiveRow == null) return;
  76. CoreClientParam ccp = new CoreClientParam();
  77. Hashtable ht = new Hashtable();
  78. if (this.ultraTabControl1.Tabs[0].Selected)//标准牌号改判
  79. {
  80. if (this.ultraGrid4.ActiveRow == null) return;
  81. ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text);
  82. ht.Add("i2", this.ultraGrid4.ActiveRow.Cells["PRDNM_CD"].Text);
  83. ht.Add("i3", this.ultraGrid4.ActiveRow.Cells["SPEC_ABBSYM"].Text);
  84. ht.Add("i4", this.ultraGrid4.ActiveRow.Cells["SPEC_STL_GRD"].Text);
  85. ht.Add("i5", this.ultraGrid4.ActiveRow.Cells["ORD_USE_TP"].Text);
  86. ht.Add("i6", this.ultraGrid4.ActiveRow.Cells["THK_MIN"].Text);
  87. ht.Add("i7", this.ultraGrid4.ActiveRow.Cells["THK_MAX"].Text);
  88. ht.Add("i8", this.UserInfo.GetUserName().ToString());
  89. ht.Add("o9", "");
  90. ccp.ServerName = "UIB.COM.ComDBProcedure";
  91. ccp.MethodName = "doXmlProcedure";
  92. if (this.comboBox3.Text == "连退")
  93. {
  94. ccp.ServerParams = new object[] { "UIB030230_YCCD_GP.CALL", ht };
  95. }
  96. else
  97. {
  98. ccp.ServerParams = new object[] { "UIB030240_YCCD_GP.CALL", ht };
  99. }
  100. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  101. System.Collections.ArrayList err = ccp.ReturnObject as System.Collections.ArrayList;
  102. if (err != null && err.Count > 0 && err[0] != null)
  103. {
  104. string retInfo = err[0].ToString().Trim();
  105. if (!"YY".Equals(retInfo))
  106. {
  107. System.Windows.Forms.MessageBox.Show(retInfo);
  108. }
  109. }
  110. }
  111. else if (this.ultraTabControl1.Tabs[1].Selected)//合同订单改判
  112. {
  113. if (this.ultraGrid3.ActiveRow == null) return;
  114. ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text);
  115. ht.Add("i2", this.ultraGrid3.ActiveRow.Cells["PRODNM_CD"].Text);
  116. ht.Add("i3", this.ultraGrid3.ActiveRow.Cells["C_SPEC_ABBSYM"].Text);
  117. ht.Add("i4", this.ultraGrid3.ActiveRow.Cells["C_SPEC_STL_GRD"].Text);
  118. ht.Add("i5", this.ultraGrid3.ActiveRow.Cells["ORD_USEAGE_CD"].Text);
  119. ht.Add("i6", "");
  120. ht.Add("i7", "");
  121. ht.Add("i8", this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text);
  122. ht.Add("i9", this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text);
  123. ht.Add("i10", "DD"); //表示按订单改判;PH为按牌号改判
  124. ht.Add("i11", this.UserInfo.GetUserName().ToString());
  125. ht.Add("o12", "");
  126. ccp.ServerName = "UIB.COM.ComDBProcedure";
  127. ccp.MethodName = "doXmlProcedure";
  128. if (this.comboBox3.Text == "连退")
  129. {
  130. ccp.ServerParams = new object[] { "UIB030230_YCCD_GP_ORD.CALL", ht };
  131. }
  132. else
  133. {
  134. ccp.ServerParams = new object[] { "UIB030240_YCCD_GP_ORD.CALL", ht };
  135. }
  136. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  137. System.Collections.ArrayList err = ccp.ReturnObject as System.Collections.ArrayList;
  138. if (err != null && err.Count > 0 && err[0] != null)
  139. {
  140. string retInfo = err[0].ToString().Trim();
  141. if (!"YY".Equals(retInfo))
  142. {
  143. System.Windows.Forms.MessageBox.Show(retInfo);
  144. }
  145. }
  146. }
  147. this.DoQuery();
  148. }
  149. catch (Exception ex)
  150. {
  151. MessageBox.Show(ex.ToString());
  152. }
  153. }
  154. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  155. {
  156. try
  157. {
  158. if (this.ultraGrid1.ActiveRow == null) return;
  159. ArrayList al = new ArrayList();
  160. if (this.ultraTabControl1.Tabs[0].Selected)//查询标准牌号信息
  161. {
  162. al.Add("UIB030230_02.SELECT");
  163. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  164. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  165. this.dataSet3.Tables[0].Clear();
  166. this.dataSet2.Tables[0].Clear();
  167. CoreClientParam ccp = new CoreClientParam();
  168. ccp.ServerName = "UIB.COM.ComDBQuery";
  169. ccp.MethodName = "doSimpleQuery";
  170. ccp.ServerParams = new object[] { al };
  171. ccp.SourceDataTable = this.dataSet2.Tables[0];
  172. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  173. }
  174. else if (this.ultraTabControl1.Tabs[1].Selected && this.dataSet2.Tables[1].Rows.Count < 1)//查询合同订单信息
  175. {
  176. al.Add("UIB030230_ORD.select");
  177. al.Add(this.textBox1_ordNo.Text.Trim());
  178. this.dataSet3.Tables[0].Clear();
  179. this.dataSet2.Tables[1].Clear();
  180. CoreClientParam ccp = new CoreClientParam();
  181. ccp.ServerName = "UIB.COM.ComDBQuery";
  182. ccp.MethodName = "doSimpleQuery";
  183. ccp.ServerParams = new object[] { al };
  184. ccp.SourceDataTable = this.dataSet2.Tables[1];
  185. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  186. }
  187. }
  188. catch (Exception ex)
  189. {
  190. }
  191. }
  192. //获取标准对应的材质信息
  193. private void ultraGrid4_AfterRowActivate(object sender, EventArgs e)
  194. {
  195. try
  196. {
  197. if (this.ultraGrid1.ActiveRow == null) return;
  198. if (this.ultraGrid4.ActiveRow == null) return;
  199. ArrayList al = new ArrayList();
  200. al.Add("UIB030230_03.SELECT");
  201. al.Add(this.ultraGrid4.ActiveRow.Cells["PRDNM_CD"].Text);
  202. al.Add(this.ultraGrid4.ActiveRow.Cells["SPEC_ABBSYM"].Text);
  203. al.Add(this.ultraGrid4.ActiveRow.Cells["SPEC_STL_GRD"].Text);
  204. al.Add(this.ultraGrid4.ActiveRow.Cells["ORD_USE_TP"].Text);
  205. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  206. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  207. this.dataSet3.Tables[0].Clear();
  208. CoreClientParam ccp = new CoreClientParam();
  209. ccp.ServerName = "UIB.COM.ComDBQuery";
  210. ccp.MethodName = "doSimpleQuery";
  211. ccp.ServerParams = new object[] { al };
  212. ccp.SourceDataTable = this.dataSet3.Tables[0];
  213. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  214. }
  215. catch (Exception ex)
  216. {
  217. }
  218. }
  219. private void ultraGrid3_AfterRowActivate(object sender, EventArgs e)
  220. {
  221. try
  222. {
  223. if (this.ultraGrid1.ActiveRow == null) return;
  224. if (this.ultraGrid3.ActiveRow == null) return;
  225. ArrayList al = new ArrayList();
  226. al.Add("UIB030230_ord_03.SELECT");
  227. al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text);
  228. al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text);
  229. al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text);
  230. al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text);
  231. this.dataSet3.Tables[0].Clear();
  232. CoreClientParam ccp = new CoreClientParam();
  233. ccp.ServerName = "UIB.COM.ComDBQuery";
  234. ccp.MethodName = "doSimpleQuery";
  235. ccp.ServerParams = new object[] { al };
  236. ccp.SourceDataTable = this.dataSet3.Tables[0];
  237. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  238. }
  239. catch (Exception ex)
  240. {
  241. }
  242. }
  243. private void ultraButton1_Click(object sender, EventArgs e)
  244. {
  245. try
  246. {
  247. if (!this.ultraTabControl1.Tabs[1].Selected)//查询合同订单信息
  248. {
  249. this.ultraTabControl1.SelectedTab = this.ultraTabControl1.Tabs[1];
  250. }
  251. ArrayList al = new ArrayList();
  252. al.Add("UIB030230_ORD.select");
  253. al.Add(this.textBox1_ordNo.Text.Trim());
  254. this.dataSet3.Tables[0].Clear();
  255. this.dataSet2.Tables[1].Clear();
  256. CoreClientParam ccp = new CoreClientParam();
  257. ccp.ServerName = "UIB.COM.ComDBQuery";
  258. ccp.MethodName = "doSimpleQuery";
  259. ccp.ServerParams = new object[] { al };
  260. ccp.SourceDataTable = this.dataSet2.Tables[1];
  261. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  262. }
  263. catch (Exception ex)
  264. {
  265. }
  266. }
  267. private void UIB030250_Load(object sender, EventArgs e)
  268. {
  269. this.comboBox3.SelectedIndex = 0;
  270. }
  271. }
  272. }