UIB030230.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 UIB030230 : FrmBase
  16. {
  17. public UIB030230()
  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. al.Add("UIB030230_01.SELECT");
  39. al.Add(this.textBox3_COILNO.Text.Trim());
  40. this.dataSet1.Tables[0].Clear();
  41. CoreClientParam ccp = new CoreClientParam();
  42. ccp.ServerName = "UIB.COM.ComDBQuery";
  43. ccp.MethodName = "doSimpleQuery";
  44. ccp.ServerParams = new object[] { al };
  45. ccp.SourceDataTable = this.dataSet1.Tables[0];
  46. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  47. }
  48. catch (Exception ex)
  49. {
  50. }
  51. }
  52. public void DoSave()
  53. {
  54. try
  55. {
  56. if (MessageBox.Show("确定改判?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
  57. return;
  58. //改判
  59. CoreClientParam ccp = new CoreClientParam();
  60. Hashtable ht = new Hashtable();
  61. ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text);
  62. ht.Add("i2", this.ultraGrid2.ActiveRow.Cells["PRDNM_CD"].Text);
  63. ht.Add("i3", this.ultraGrid2.ActiveRow.Cells["SPEC_ABBSYM"].Text);
  64. ht.Add("i4", this.ultraGrid2.ActiveRow.Cells["SPEC_STL_GRD"].Text);
  65. ht.Add("i5", this.ultraGrid2.ActiveRow.Cells["ORD_USE_TP"].Text);
  66. ht.Add("i6", this.UserInfo.GetUserName().ToString());
  67. ht.Add("o7", "");
  68. ccp.ServerName = "UIB.COM.ComDBProcedure";
  69. ccp.MethodName = "doXmlProcedure";
  70. ccp.ServerParams = new object[] { "UIB030230_01.CALL", ht };
  71. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  72. this.DoQuery();
  73. ////材质判定
  74. //CoreClientParam ccp = new CoreClientParam();
  75. //Hashtable ht = new Hashtable();
  76. //ht.Add("i1", this.UserInfo.GetUserName());
  77. //ht.Add("o2", "");
  78. //ccp.ServerName = "UIB.COM.ComDBProcedure";
  79. //ccp.MethodName = "doXmlProcedure";
  80. //ccp.ServerParams = new object[] { "UIB030140_01.CALL", ht };
  81. //this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  82. //this.DoQuery();
  83. }
  84. catch (Exception ex)
  85. {
  86. }
  87. }
  88. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  89. {
  90. try
  91. {
  92. if (this.ultraGrid1.ActiveRow == null) return;
  93. ArrayList al = new ArrayList();
  94. al.Add("UIB030230_02.SELECT");
  95. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  96. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  97. this.dataSet3.Tables[0].Clear();
  98. this.dataSet2.Tables[0].Clear();
  99. CoreClientParam ccp = new CoreClientParam();
  100. ccp.ServerName = "UIB.COM.ComDBQuery";
  101. ccp.MethodName = "doSimpleQuery";
  102. ccp.ServerParams = new object[] { al };
  103. ccp.SourceDataTable = this.dataSet2.Tables[0];
  104. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  105. }
  106. catch (Exception ex)
  107. {
  108. }
  109. }
  110. private void ultraGrid2_DoubleClick(object sender, EventArgs e)
  111. {
  112. }
  113. //获取标准对应的材质信息
  114. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  115. {
  116. try
  117. {
  118. if (this.ultraGrid1.ActiveRow == null) return;
  119. if (this.ultraGrid2.ActiveRow == null) return;
  120. ArrayList al = new ArrayList();
  121. al.Add("UIB030230_03.SELECT");
  122. al.Add(this.ultraGrid2.ActiveRow.Cells["PRDNM_CD"].Text);
  123. al.Add(this.ultraGrid2.ActiveRow.Cells["SPEC_ABBSYM"].Text);
  124. al.Add(this.ultraGrid2.ActiveRow.Cells["SPEC_STL_GRD"].Text);
  125. al.Add(this.ultraGrid2.ActiveRow.Cells["ORD_USE_TP"].Text);
  126. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  127. al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);
  128. this.dataSet3.Tables[0].Clear();
  129. CoreClientParam ccp = new CoreClientParam();
  130. ccp.ServerName = "UIB.COM.ComDBQuery";
  131. ccp.MethodName = "doSimpleQuery";
  132. ccp.ServerParams = new object[] { al };
  133. ccp.SourceDataTable = this.dataSet3.Tables[0];
  134. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  135. }
  136. catch (Exception ex)
  137. {
  138. }
  139. }
  140. }
  141. }