QCM0402.cs 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. using CoreFS.CA06;
  2. using Infragistics.Win;
  3. using Infragistics.Win.UltraWinGrid;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Windows.Forms;
  12. namespace Core.LZMes.Client.QCM
  13. {
  14. public partial class QCM0402 : FrmBase
  15. {
  16. public QCM0402()
  17. {
  18. InitializeComponent();
  19. }
  20. #region 初始化
  21. private void QCM0402_Load(object sender, EventArgs e)
  22. {
  23. ValueList v2 = new ValueList();
  24. v2.ValueListItems.Add("00", "待提报");
  25. v2.ValueListItems.Add("10", "待确认");
  26. v2.ValueListItems.Add("20", "审批中");
  27. v2.ValueListItems.Add("30", "审批拒绝");
  28. v2.ValueListItems.Add("40", "审批退回");
  29. v2.ValueListItems.Add("50", "审批通过");
  30. ultraGrid1.DisplayLayout.Bands[0].Columns["CERT_STATUS"].ValueList = v2.Clone();
  31. }
  32. #endregion
  33. #region 按钮
  34. #region 查询按钮
  35. private void button3_Click(object sender, EventArgs e)
  36. {
  37. Query();
  38. }
  39. private void Query()
  40. {
  41. try
  42. {
  43. String STARTTIME = this.dateTimePicker4.Value.ToString("yyyy-MM-dd");
  44. String ENDTIME = this.dateTimePicker3.Value.ToString("yyyy-MM-dd");
  45. String CERT_INST_NAME = this.textBox6.Text.Trim();//认证机构
  46. String BATCH_NO = this.textBox5.Text.Trim();//轧批号
  47. String shordh = "";//销售订单号
  48. CoreClientParam ccp = new CoreClientParam();
  49. this.dataSet1.Clear();
  50. ccp.ServerName = "QCM.JHY01.JHY0103.QuerryThirdInfo";
  51. ccp.MethodName = "QueryMainInfo";
  52. ccp.ServerParams = new object[] { STARTTIME, ENDTIME, CERT_INST_NAME, BATCH_NO, shordh };
  53. ccp.SourceDataTable = this.dataSet1.Tables[0];
  54. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  55. }
  56. catch (Exception ex)
  57. {
  58. System.Diagnostics.Debug.WriteLine(ex.ToString());
  59. MessageBox.Show("系统出错,请联系管理人员", "警告");
  60. }
  61. }
  62. #endregion
  63. #region 剔除子板按钮
  64. private void button2_Click(object sender, EventArgs e)
  65. {
  66. try
  67. {
  68. if (MessageBox.Show("确认剔除子板?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  69. {
  70. return;
  71. }
  72. UltraGridRow row = ultraGrid2.ActiveRow;
  73. String CERT_NO = row.Cells["CERT_NO"].Value.ToString();//认证申报编号
  74. String MATERIAL_NO = row.Cells["MATERIAL_NO"].Value.ToString();//产品序号
  75. string cm = CERT_NO + "," + MATERIAL_NO;
  76. this.dataSet2.Clear();
  77. CoreClientParam ccp = new CoreClientParam();
  78. ccp.ServerName = "QCM.JHY01.JHY0103.DeleteMaterialInfo";
  79. ccp.MethodName = "delete2";
  80. ccp.ServerParams = new object[] { cm };
  81. ccp.SourceDataTable = this.dataSet2.Tables[0];
  82. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  83. ultraGrid1AfterRowActivate();
  84. }
  85. catch (Exception ex)
  86. {
  87. System.Diagnostics.Debug.WriteLine(ex.ToString());
  88. MessageBox.Show("系统出错,请联系管理人员", "警告");
  89. }
  90. }
  91. #endregion
  92. #region 申报确认
  93. private void button1_Click(object sender, EventArgs e)
  94. {
  95. try
  96. {
  97. if (MessageBox.Show("确认申报确认?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  98. {
  99. return;
  100. }
  101. UltraGridRow row = ultraGrid1.ActiveRow;
  102. String CERT_NO = row.Cells["CERT_NO"].Value.ToString();//认证申报编号
  103. this.dataSet1.Clear();
  104. CoreClientParam ccp = new CoreClientParam();
  105. ccp.ServerName = "QCM.JHY01.JHY0103.DeleteMaterialInfo";
  106. ccp.MethodName = "updateM";
  107. ccp.ServerParams = new object[] { CERT_NO };
  108. ccp.SourceDataTable = this.dataSet1.Tables[0];
  109. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  110. Query();
  111. }
  112. catch (Exception ex)
  113. {
  114. System.Diagnostics.Debug.WriteLine(ex.ToString());
  115. MessageBox.Show("系统出错,请联系管理人员", "警告");
  116. }
  117. }
  118. #endregion
  119. #endregion
  120. #region ultraGrid1单击事件
  121. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  122. {
  123. ultraGrid1AfterRowActivate();
  124. }
  125. public void ultraGrid1AfterRowActivate()
  126. {
  127. try
  128. {
  129. UltraGridRow row = ultraGrid1.ActiveRow;
  130. String CERT_NO = row.Cells["CERT_NO"].Value.ToString();//认证申报编号
  131. String BATCH_NO = "";//轧批号
  132. String design_key = "";//design_key
  133. this.dataSet2.Clear();
  134. CoreClientParam ccp = new CoreClientParam();
  135. ccp.ServerName = "QCM.JHY01.JHY0103.QuerryThirdInfo";
  136. ccp.MethodName = "QueryDetailInfo";
  137. ccp.ServerParams = new object[] { CERT_NO, BATCH_NO, design_key };
  138. ccp.SourceDataTable = this.dataSet2.Tables[0];
  139. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  140. DataTable table = this.dataTable1;
  141. if (table == null)
  142. {
  143. this.dataSet2.Clear();
  144. }
  145. }
  146. catch (Exception ex)
  147. {
  148. System.Diagnostics.Debug.WriteLine(ex.ToString());
  149. MessageBox.Show("系统出错,请联系管理人员", "警告");
  150. }
  151. }
  152. #endregion
  153. }
  154. }