FrmQADefects.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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 Infragistics.Win.UltraWinGrid;
  13. using Infragistics.Win;
  14. using com.steering.mes.zgmil.entity;
  15. using System.Collections;
  16. using Core.Mes.Client.Comm.Tool;
  17. using Core.StlMes.Client.ZGMil.Common;
  18. namespace Core.StlMes.Client.ZGMil.Popup
  19. {
  20. public partial class FrmQADefectS : FrmBase
  21. {
  22. OpeBase _ob = null;
  23. private string _JudgeStoveNo = "";
  24. private string proPlanId = null;//轧管订单编号
  25. private string gxPlanNo = null;//工序排产序号
  26. private string _ResultNo = "";
  27. private string _LotNo = "";
  28. private int _OffLineFlag = 0; //下线 反线标识
  29. int _QAFlag = 0;
  30. private string ColUser = "";
  31. private string ColGroup = "";
  32. private string ColShift = "";
  33. private int _MatNum = 0;
  34. private double _Diameter = 0; //外径
  35. private double _Thickness = 0; //壁厚
  36. private double _Length = 0; //长度
  37. private double _HeightRate = 1; //重量系数
  38. private int _OffLineNum = 0; //下线支
  39. private int _WasteNum = 0; //废品支
  40. private double _DBHeight = 0; //单支管重量 = (外径 - 壁厚)* 壁厚 * 0.02466 * 长度 * 重量系数
  41. UltraGridRow ActiveSimpleRow = null;
  42. string ActiveSimpleNo = "";
  43. public string _ScrapNum //废品支数 用于传值到参数设定界面
  44. {
  45. get { return umeScrapNum.Value.ToString(); }
  46. }
  47. public string _OffLineNumF //下线品支数 用于传值到参数设定界面
  48. {
  49. get { return umeOffLineNum.Value.ToString(); }
  50. }
  51. public string _ZLXS //重量系数 用于传值到参数设定界面
  52. {
  53. get { return this.uneZL.Value.ToString(); }
  54. }
  55. public FrmQADefectS(string JudgeStoveNo, string ResultNo, string ProPlanId, string GxPlanNo, string LotNo, int MatNum, double Diameter, double Thickness, double Length, int QaFlag, int OffLineFlag, OpeBase ob)
  56. {
  57. _JudgeStoveNo = JudgeStoveNo;
  58. _ResultNo = ResultNo;
  59. proPlanId = ProPlanId;
  60. gxPlanNo = GxPlanNo;
  61. _LotNo = LotNo;
  62. _ob = ob;
  63. _Diameter = Diameter;
  64. _Thickness = Thickness;
  65. _Length = Length;
  66. _MatNum = MatNum;
  67. _QAFlag = QaFlag;
  68. _OffLineFlag = OffLineFlag;
  69. InitializeComponent();
  70. InitCol();
  71. }
  72. /// <summary>
  73. /// 初始化
  74. /// </summary>
  75. private void InitCol()
  76. {
  77. ultraGrid2.ClickCellButton += new CellEventHandler(ultraGrid2_ClickCellButton); //添加缺陷项
  78. ultraGrid1.ClickCellButton += new CellEventHandler(ultraGrid1_ClickCellButton); //删除缺陷项
  79. dtItem.Clear();
  80. cmbItemLevel.Items.Add("", " ");
  81. cmbItemLevel.Items.Add(0, "常用");
  82. cmbItemLevel.Items.Add(1, "不常用");
  83. txtItemCode.Text = "";
  84. txtItemName.Text = "";
  85. GetResult(); //查询已抽检过的废品支 下线支 重量系数
  86. GetDefectItem(); //查询已有缺陷项
  87. txtHeatNo.Text = BaseMethod.getJudgeStoveNo(_JudgeStoveNo);
  88. txtLotNo.Text = _LotNo;
  89. ColUser = UserInfo.GetUserName();
  90. ColGroup = UserInfo.GetUserGroup();
  91. ColShift = UserInfo.GetUserOrder();
  92. uneZL.Value = _HeightRate;
  93. _DBHeight = (_Diameter - _Thickness) * _Thickness * 0.02466 * _Length * double.Parse(uneZL.Value.ToString());
  94. umeScrapTon.Value = _DBHeight * int.Parse(umeScrapNum.Value.ToString());
  95. GetDefectAll();
  96. SimpleQuery();
  97. }
  98. /// <summary>
  99. /// 查询实绩参数 如果是质检过的 带来质检数据 重量系数 下线支 废品支
  100. /// </summary>
  101. private void GetResult()
  102. {
  103. //查询该炉重量系数 下线支 废品支
  104. DataTable dtZLXS = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.GetQAResult", new object[] { _JudgeStoveNo, _ResultNo, proPlanId, gxPlanNo }, this._ob);
  105. if (dtZLXS.Rows.Count > 0)
  106. {
  107. //重量系数
  108. if (!string.IsNullOrEmpty(dtZLXS.Rows[0]["HEIGHT_RATE"].ToString()))
  109. {
  110. _HeightRate = double.Parse(dtZLXS.Rows[0]["HEIGHT_RATE"].ToString());
  111. }
  112. if (_QAFlag == 1)
  113. {
  114. //下线支
  115. if (!string.IsNullOrEmpty(dtZLXS.Rows[0]["OFFLINE_QUANTITY_F"].ToString()))
  116. {
  117. _OffLineNum = int.Parse(dtZLXS.Rows[0]["OFFLINE_QUANTITY_F"].ToString());
  118. }
  119. //废品支
  120. if (!string.IsNullOrEmpty(dtZLXS.Rows[0]["WASTE_QUANTITY_F"].ToString()))
  121. {
  122. _WasteNum = int.Parse(dtZLXS.Rows[0]["WASTE_QUANTITY_F"].ToString());
  123. }
  124. }
  125. else
  126. {
  127. //下线支
  128. if (!string.IsNullOrEmpty(dtZLXS.Rows[0]["OFFLINE_QUANTITY_S"].ToString()))
  129. {
  130. _OffLineNum = int.Parse(dtZLXS.Rows[0]["OFFLINE_QUANTITY_S"].ToString());
  131. }
  132. //废品支
  133. if (!string.IsNullOrEmpty(dtZLXS.Rows[0]["WASTE_QUANTITY_S"].ToString()))
  134. {
  135. _WasteNum = int.Parse(dtZLXS.Rows[0]["WASTE_QUANTITY_S"].ToString());
  136. }
  137. }
  138. }
  139. umeScrapNum.Value = _WasteNum;
  140. umeOffLineNum.Value = _OffLineNum;
  141. }
  142. /// <summary>
  143. /// chk事件
  144. /// </summary>
  145. /// <param name="sender"></param>
  146. /// <param name="e"></param>
  147. private void chkItemLevel_CheckedChanged(object sender, EventArgs e)
  148. {
  149. if (this.chkItemLevel.Checked)
  150. {
  151. cmbItemLevel.Enabled = true;
  152. }
  153. else
  154. {
  155. cmbItemLevel.Enabled = false;
  156. }
  157. if (chkItemCode.Checked)
  158. {
  159. txtItemCode.Enabled = true;
  160. }
  161. else
  162. {
  163. txtItemCode.Enabled = false;
  164. }
  165. if (chkItemName.Checked)
  166. {
  167. txtItemName.Enabled = true;
  168. }
  169. else
  170. {
  171. txtItemName.Enabled = false;
  172. }
  173. }
  174. /// <summary>
  175. /// 查询当前炉次已有缺陷项
  176. /// </summary>
  177. private void GetDefectItem()
  178. {
  179. string ItemName = "";
  180. string Offline = "";
  181. string WasteBrach = "";
  182. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.checkedDefectItemQuery", new object[] { _JudgeStoveNo, _ResultNo, _QAFlag }, this._ob);
  183. if (dt.Rows.Count > 0)
  184. {
  185. for (int i = 0; i < dt.Rows.Count; i++)
  186. {
  187. ItemName = dt.Rows[i]["DEFECT_ITEM"].ToString();
  188. WasteBrach = dt.Rows[i]["WASTE_BRANCH"].ToString();
  189. Offline = dt.Rows[i]["OFFLINE_PRODUCT"].ToString();
  190. DataRow dr1 = dtDefect.NewRow();
  191. dr1["DEFECT_ITEM"] = ItemName;
  192. dr1["WASTE_BRANCH"] = WasteBrach;
  193. dr1["OFFLINE_PRODUCT"] = Offline;
  194. dr1["DELETE_ITEM"] = "移除";
  195. dtDefect.Rows.Add(dr1);
  196. }
  197. ultraGrid2.DataBind();
  198. }
  199. }
  200. private void GetDefectAll()
  201. {
  202. string ItemName = "";
  203. string ItemLevel = "";
  204. if (this.chkItemLevel.Checked)
  205. {
  206. ItemLevel = cmbItemLevel.Value.ToString();
  207. }
  208. else
  209. {
  210. ItemLevel = "";
  211. }
  212. //if (chkItemCode.Checked)
  213. //{
  214. // ItemCode = txtItemCode.Text.ToUpper();
  215. //}
  216. //else
  217. //{
  218. // ItemCode = "";
  219. //}
  220. if (chkItemName.Checked)
  221. {
  222. ItemName = txtItemName.Text;
  223. }
  224. else
  225. {
  226. ItemName = "";
  227. }
  228. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.defectItemQuery", new object[] { ItemLevel, ItemName }, this._ob);
  229. GridHelper.CopyDataToDatatable(ref dt, ref dtItem, true);
  230. }
  231. /// <summary>
  232. /// 缺陷项查询条件
  233. /// </summary>
  234. /// <param name="sender"></param>
  235. /// <param name="e"></param>
  236. private void ultraButton2_Click(object sender, EventArgs e)
  237. {
  238. GetDefectAll();
  239. }
  240. /// <summary>
  241. /// 添加缺陷项
  242. /// </summary>
  243. /// <param name="sender"></param>
  244. /// <param name="e"></param>
  245. void ultraGrid2_ClickCellButton(object sender, CellEventArgs e)
  246. {
  247. if (e.Cell.Column.Key == "ADD_ITEM")
  248. {
  249. if (ultraGrid3.ActiveRow == null)
  250. {
  251. MessageBox.Show("请选择性能批后添加缺陷项");
  252. return;
  253. }
  254. if (string.IsNullOrEmpty(e.Cell.Row.Cells["WASTENUM"].Value.ToString()) && string.IsNullOrEmpty(e.Cell.Row.Cells["OFFNUM"].Value.ToString()))
  255. {
  256. MessageBox.Show("请输入正确的支数。");
  257. return;
  258. }
  259. if (e.Cell.Row.Cells["WASTENUM"].Value.ToString() == "0" && e.Cell.Row.Cells["OFFNUM"].Value.ToString() == "0")
  260. {
  261. MessageBox.Show("选择的缺陷项需要输入下线支或废品支。");
  262. return;
  263. }
  264. MilCheckDeatilEntity CheckDetailSave = new MilCheckDeatilEntity();
  265. CheckDetailSave.JudgeStoveNo = _JudgeStoveNo;
  266. CheckDetailSave.ResultNo = _ResultNo;
  267. CheckDetailSave.DefectCode = e.Cell.Row.Cells["BASECODE"].Value.ToString();
  268. CheckDetailSave.DefectItem = e.Cell.Row.Cells["BASENAME"].Value.ToString();
  269. CheckDetailSave.WasteBranch = StrNullTo0(e.Cell.Row.Cells["WASTENUM"].Value.ToString());
  270. CheckDetailSave.OfflineProduct = StrNullTo0(e.Cell.Row.Cells["OFFNUM"].Value.ToString());
  271. CheckDetailSave.SimpleLotNo = ActiveSimpleNo;
  272. CheckDetailSave.Flag = _QAFlag;
  273. //插入炉次对应缺陷项下线支、废品支
  274. int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.insertDefectDataSimple", new object[] { CheckDetailSave}, this._ob);
  275. SimpleCheckQuery();
  276. SimpleQuery();
  277. }
  278. }
  279. /// <summary>
  280. /// 移除缺陷项
  281. /// </summary>
  282. /// <param name="sender"></param>
  283. /// <param name="e"></param>
  284. void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
  285. {
  286. if (e.Cell.Column.Key == "DELETE_ITEM")
  287. {
  288. MilCheckDeatilEntity CheckDetailSave = new MilCheckDeatilEntity();
  289. CheckDetailSave.JudgeStoveNo = _JudgeStoveNo;
  290. CheckDetailSave.ResultNo = _ResultNo;
  291. CheckDetailSave.DefectCode = e.Cell.Row.Cells["DEFECT_CODE"].Value.ToString();
  292. CheckDetailSave.SimpleLotNo = ActiveSimpleNo;
  293. int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.deleteDefectDataSimple", new object[] { CheckDetailSave }, this._ob);
  294. SimpleCheckQuery();
  295. SimpleQuery();
  296. }
  297. //throw new NotImplementedException();
  298. }
  299. private string StrNullTo0(string str)
  300. {
  301. return string.IsNullOrEmpty(str) ? "0" : str;
  302. }
  303. /// <summary>
  304. /// 数据检验
  305. /// </summary>
  306. /// <returns></returns>
  307. private bool DateCheck()
  308. {
  309. bool Check = true;
  310. int DefectScrapNumTotal = 0; //缺陷项总剔除支数
  311. int DefectOffNumTotal = 0; //缺陷项总下线支数
  312. if (_QAFlag == 1)
  313. {
  314. //废品支 下线支数据检验
  315. if (string.IsNullOrEmpty(umeScrapNum.Value.ToString()))
  316. {
  317. MessageBox.Show("废品支不能为空!");
  318. umeScrapNum.Focus();
  319. return Check = false;
  320. }
  321. if (int.Parse(umeScrapNum.Value.ToString()) > _MatNum)
  322. {
  323. MessageBox.Show("废品支不能为大于现有炉次总支数!");
  324. umeScrapNum.Focus();
  325. return Check = false;
  326. }
  327. if (string.IsNullOrEmpty(this.umeOffLineNum.Value.ToString()))
  328. {
  329. MessageBox.Show("下线支不能为空!");
  330. umeOffLineNum.Focus();
  331. return Check = false;
  332. }
  333. if (int.Parse(umeScrapNum.Value.ToString()) > _MatNum)
  334. {
  335. MessageBox.Show("下线支不能为大于现有炉次总支数!");
  336. umeOffLineNum.Focus();
  337. return Check = false;
  338. }
  339. }
  340. else
  341. {
  342. //查询该炉一次抽检下线支
  343. DataTable dtQAOffNum = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.GetQAResult", new object[] { _JudgeStoveNo, _ResultNo, proPlanId, gxPlanNo }, this._ob);
  344. int OffNum = int.Parse(dtQAOffNum.Rows[0]["OFFLINE_QUANTITY_F"].ToString());
  345. //废品支 下线支数据检验
  346. if (string.IsNullOrEmpty(umeScrapNum.Value.ToString()))
  347. {
  348. MessageBox.Show("废品支不能为空!");
  349. umeScrapNum.Focus();
  350. return Check = false;
  351. }
  352. if (string.IsNullOrEmpty(this.umeOffLineNum.Value.ToString()))
  353. {
  354. MessageBox.Show("下线支不能为空!");
  355. umeOffLineNum.Focus();
  356. return Check = false;
  357. }
  358. if ((int.Parse(umeScrapNum.Value.ToString()) + int.Parse(umeScrapNum.Value.ToString()) > OffNum))
  359. {
  360. MessageBox.Show("废品支数和下线支数总和不能大于一检下线支数!一检下线支数:" + OffNum + "");
  361. umeOffLineNum.Focus();
  362. return Check = false;
  363. }
  364. }
  365. //缺陷项记录检验
  366. //缺陷项废品支不能大于总废品支,缺陷项下线支不能大于总下线支
  367. //所有缺陷项下线品/废品支之和需要大于下线总支数/废品总支数
  368. for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  369. {
  370. if (string.IsNullOrEmpty(ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Value.ToString()))
  371. {
  372. MessageBox.Show("");
  373. ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Activated = true;
  374. return Check = false;
  375. }
  376. else
  377. {
  378. if (int.Parse(ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Value.ToString()) > int.Parse(umeScrapNum.Value.ToString()))
  379. {
  380. MessageBox.Show("缺陷项废品支不能大于总废品支!!!");
  381. ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Activated = true;
  382. return Check = false;
  383. }
  384. else
  385. {
  386. DefectScrapNumTotal += int.Parse(ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Value.ToString());
  387. }
  388. }
  389. if (string.IsNullOrEmpty(ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Value.ToString()))
  390. {
  391. MessageBox.Show("");
  392. ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Activated = true;
  393. return Check = false;
  394. }
  395. else
  396. {
  397. if (int.Parse(ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Value.ToString()) > int.Parse(umeOffLineNum.Value.ToString()))
  398. {
  399. MessageBox.Show("缺陷项下线支不能大于总下线支!!!");
  400. ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Activated = true;
  401. return Check = false;
  402. }
  403. else
  404. {
  405. DefectOffNumTotal += int.Parse(ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Value.ToString());
  406. }
  407. }
  408. }
  409. if (DefectScrapNumTotal < int.Parse(umeScrapNum.Value.ToString()))
  410. {
  411. MessageBox.Show("缺陷项废品总支数小于管号废品总支数!!");
  412. return Check = false;
  413. }
  414. if (DefectOffNumTotal < int.Parse(umeOffLineNum.Value.ToString()))
  415. {
  416. MessageBox.Show("缺陷项下线总支数小于管号下线总支数!!");
  417. return Check = false;
  418. }
  419. return Check;
  420. }
  421. /// <summary>
  422. /// 确认按钮
  423. /// </summary>
  424. /// <param name="sender"></param>
  425. /// <param name="e"></param>
  426. private void btnOK_Click(object sender, EventArgs e)
  427. {
  428. this.Close();
  429. return;
  430. //if (!DateCheck())
  431. //{
  432. //}
  433. //ArrayList ListCehckSize = new ArrayList();
  434. // if (ultraGrid1.Rows.Count > 0)
  435. // {
  436. // //保存缺陷项信息
  437. // for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  438. // {
  439. // MilCheckDeatilEntity CheckDetailSave = new MilCheckDeatilEntity();
  440. // CheckDetailSave.JudgeStoveNo = _JudgeStoveNo;
  441. // CheckDetailSave.ResultNo = _ResultNo;
  442. // CheckDetailSave.DefectCode = ultraGrid1.Rows[i].Cells["DEFECT_ITEM_CODE"].Value.ToString();
  443. // CheckDetailSave.DefectItem = ultraGrid1.Rows[i].Cells["DEFECT_ITEM"].Value.ToString();
  444. // CheckDetailSave.WasteBranch = StrNullTo0(ultraGrid1.Rows[i].Cells["WASTE_BRANCH"].Value.ToString());
  445. // CheckDetailSave.OfflineProduct = StrNullTo0(ultraGrid1.Rows[i].Cells["OFFLINE_PRODUCT"].Value.ToString());
  446. // CheckDetailSave.Flag = _QAFlag;
  447. // ListCehckSize.Add(CheckDetailSave);
  448. // }
  449. // }
  450. // //插入炉次对应缺陷项下线支、废品支
  451. // int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.insertDefectData", new object[] { ListCehckSize, _JudgeStoveNo, _ResultNo, _QAFlag }, this._ob);
  452. // Random Ran = new Random();
  453. // int ScrapRanSeq = _MatNum - int.Parse(_OffLineNumF) - int.Parse(_ScrapNum) + 1;
  454. // //int ScrapRanSeq = Ran.Next(1, _MatNum - int.Parse(umeScrapNum.Value.ToString()) - int.Parse(umeOffLineNum.Value.ToString())); //废品随机起始支 下线品起始支=废品起始支+废品总支数
  455. // //1-删除缺陷管号 2-修改管号状态 最终下线-正常、剔除-正常 3-删除管号剔除表记录
  456. // int count3 = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.deleteDefectMat", new object[] { _JudgeStoveNo, _ResultNo, _QAFlag }, this._ob);
  457. // //1-插入缺陷管号 2-修改管号一次下线状态 正常-一次下线、正常-剔除 3-新增管号剔除表记录
  458. // int count1 = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.insertDefectMat", new object[] { _JudgeStoveNo, _ResultNo, ScrapRanSeq, int.Parse(umeScrapNum.Value.ToString()), int.Parse(umeOffLineNum.Value.ToString()), ColUser, ColShift, ColGroup, _QAFlag }, this._ob);
  459. // //管号插入缺陷项
  460. // int count2 = ServerHelper.SetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.inserDefectCheck", new object[] { _JudgeStoveNo, _ResultNo, ScrapRanSeq, int.Parse(umeScrapNum.Value.ToString()), int.Parse(umeOffLineNum.Value.ToString()), _QAFlag }, this._ob);
  461. // this.DialogResult = DialogResult.OK;
  462. }
  463. /// <summary>
  464. /// 根据重量系数 剔除支数算出废品吨
  465. /// </summary>
  466. /// <param name="sender"></param>
  467. /// <param name="e"></param>
  468. private void umeScrapNum_ValueChanged(object sender, EventArgs e)
  469. {
  470. _DBHeight = (_Diameter - _Thickness) * _Thickness * 0.02466 * _Length * double.Parse(uneZL.Value.ToString());
  471. umeScrapTon.Value = _DBHeight * int.Parse(umeScrapNum.Value.ToString());
  472. }
  473. //性能批查询
  474. public void SimpleQuery()
  475. {
  476. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.GetSimpleInfo", new object[] { _JudgeStoveNo, _ResultNo }, _ob);
  477. GridHelper.CopyDataToDatatable(ref dt, ref dtSimple, true);
  478. }
  479. public void SimpleCheckQuery()
  480. {
  481. if (!string.IsNullOrEmpty(ActiveSimpleNo))
  482. {
  483. DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.SurfaceInspectionResult.GetSimpleCheckInfo", new object[] { _JudgeStoveNo, _ResultNo, ActiveSimpleNo }, _ob);
  484. GridHelper.CopyDataToDatatable(ref dt, ref dtDefect, true);
  485. }
  486. }
  487. /// <summary>
  488. /// 性能批激活行事件
  489. /// </summary>
  490. /// <param name="sender"></param>
  491. /// <param name="e"></param>
  492. private void ultraGrid3_AfterRowActivate(object sender, EventArgs e)
  493. {
  494. ActiveSimpleRow = ultraGrid3.ActiveRow;
  495. ActiveSimpleNo = ActiveSimpleRow.Cells["SIMPLE_LOT_NO"].Value.ToString();
  496. SimpleCheckQuery();
  497. }
  498. private void ultraButton1_Click(object sender, EventArgs e)
  499. {
  500. SimpleQuery();
  501. }
  502. }
  503. }