FrmZPResultQuery.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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 Core.Mes.Client.Comm.Server;
  11. using Core.Mes.Client.Comm.Control;
  12. using com.steering.mes.zgmil.entity;
  13. using Infragistics.Win.UltraWinGrid;
  14. using Core.Mes.Client.Comm.Tool;
  15. using Core.StlMes.Client.ZGMil.NodeResultQuery;
  16. using Core.StlMes.Client.ZGMil.Entity;
  17. using System.Collections;
  18. namespace Core.StlMes.Client.ZGMil.Result
  19. {
  20. public partial class FrmZPResultQuery : FrmBase
  21. {
  22. #region 初始化
  23. public FrmZPResultQuery()
  24. {
  25. InitializeComponent();
  26. }
  27. /// <summary>
  28. /// 初始化控件
  29. /// </summary>
  30. private void InitControl()
  31. {
  32. }
  33. /// <summary>
  34. /// checkbox更改事件
  35. /// </summary>
  36. /// <param name="sender"></param>
  37. /// <param name="e"></param>
  38. private void chkBox_CheckedChanged(object sender, EventArgs e)
  39. {
  40. if (chkDate.Checked == true)
  41. {
  42. dtStartTime.Enabled = true;
  43. dtEndTime.Enabled = true;
  44. }
  45. else
  46. {
  47. dtStartTime.Enabled = false;
  48. dtEndTime.Enabled = false;
  49. }
  50. if (chkLotNo.Checked == true)
  51. {
  52. this.txtLotNo.Enabled = true;
  53. }
  54. else
  55. {
  56. txtLotNo.Enabled = false;
  57. }
  58. if (chkJudgeStoveNo.Checked == true)
  59. {
  60. this.txtJudgeStoveNo.Enabled = true;
  61. }
  62. else
  63. {
  64. txtJudgeStoveNo.Enabled = false;
  65. }
  66. if (chkSimpleNo.Checked == true)
  67. {
  68. // txtSimpleNo.Enabled == true;
  69. }
  70. else
  71. {
  72. // txtSimpleNo.Enabled == false;
  73. }
  74. if (chkGroupNo.Checked == true)
  75. {
  76. // txtGroupNo.Enabled == true;
  77. }
  78. else
  79. {
  80. // txtGroupNo.Enabled == false;
  81. }
  82. }
  83. #endregion
  84. #region 事件 方法
  85. /// <summary>
  86. /// 刷新
  87. /// </summary>
  88. private void Refresh()
  89. {
  90. }
  91. /// <summary>
  92. /// toolbar按钮
  93. /// </summary>
  94. /// <param name="sender"></param>
  95. /// <param name="ToolbarKey"></param>
  96. public override void ToolBar_Click(object sender, string ToolbarKey)
  97. {
  98. switch (ToolbarKey)
  99. {
  100. case "Query":
  101. Query();
  102. break;
  103. }
  104. }
  105. /// <summary>
  106. /// 查询
  107. /// </summary>
  108. private void Query()
  109. {
  110. MilOfflineGroupEntity GroupingResultQuery = new MilOfflineGroupEntity();
  111. MilOfflineGroupResumeEntity GroupingDetailQuery = new MilOfflineGroupResumeEntity();
  112. if (chkLotNo.Checked)
  113. {
  114. if (string.IsNullOrEmpty(txtLotNo.Text))
  115. {
  116. MessageBox.Show("请输入需查询的生产批号!!!");
  117. return;
  118. }
  119. else
  120. {
  121. GroupingResultQuery.ZpLotNo = txtLotNo.Text;
  122. }
  123. }
  124. else
  125. {
  126. GroupingResultQuery.ZpLotNo = "";
  127. }
  128. if (this.chkJudgeStoveNo.Checked)
  129. {
  130. if (string.IsNullOrEmpty(txtJudgeStoveNo.Text))
  131. {
  132. MessageBox.Show("请输入需查询的炉号!!!");
  133. return;
  134. }
  135. else
  136. {
  137. GroupingResultQuery.ZpJudgeStoveNo = txtJudgeStoveNo.Text;
  138. }
  139. }
  140. else
  141. {
  142. GroupingResultQuery.ZpJudgeStoveNo = "";
  143. }
  144. if (this.chkSimpleNo.Checked)
  145. {
  146. if (string.IsNullOrEmpty(this.txtSimpleNo.Text))
  147. {
  148. MessageBox.Show("请输入需查询的性能批号!!!");
  149. return;
  150. }
  151. else
  152. {
  153. GroupingDetailQuery.SimpleLotNo = txtSimpleNo.Text;
  154. }
  155. }
  156. else
  157. {
  158. GroupingDetailQuery.SimpleLotNo = "";
  159. }
  160. if (this.chkGroupNo.Checked)
  161. {
  162. if (string.IsNullOrEmpty(this.txtGroupNo.Text))
  163. {
  164. MessageBox.Show("请输入需查询的性能批组号!!!");
  165. return;
  166. }
  167. else
  168. {
  169. GroupingDetailQuery.GroupNo = txtGroupNo.Text;
  170. }
  171. }
  172. else
  173. {
  174. GroupingDetailQuery.GroupNo = "";
  175. }
  176. // DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmZPResult.GroupResultQuery", new object[] { GroupingResultQuery, EndTime }, this.ob);
  177. // GridHelper.CopyDataToDatatable(ref dt, ref dtZPResult, true);
  178. // DataTable dt1 = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmZPResult.GroupResumeQuery", new object[] { OffLineResultQuery, EndTime }, this.ob);
  179. // GridHelper.CopyDataToDatatable(ref dt, ref dtZPResult, true);
  180. //
  181. }
  182. #endregion
  183. }
  184. }