ThreaderInfoCtrl.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.StlMes.Client.Judge.Commons;
  3. using CoreFS.CA06;
  4. using System.Data;
  5. using System.Windows.Forms;
  6. namespace Core.StlMes.Client.Judge.Controls
  7. {
  8. public partial class ThreaderInfoCtrl : UserControl
  9. {
  10. private Dal _d;
  11. public ThreaderInfoCtrl(Control container, OpeBase ob)
  12. {
  13. InitializeComponent();
  14. _d = new Dal(ob);
  15. container.Controls.Add(this);
  16. this.Dock = DockStyle.Fill;
  17. }
  18. public void Query(string judgeStoveNo, string batchNo, bool clearData)
  19. {
  20. DataTable dt = _d.GetTableByXmlId("JdgMchThreaderResult.getInfo", judgeStoveNo, batchNo, clearData);
  21. GridHelper.CopyDataToDatatable(dt, dataTable1, clearData);
  22. foreach (DataRow row in dataTable1.Rows)
  23. {
  24. if (row["batchNo"].ToString() != "") continue;
  25. row["judgeStoveNo"] = judgeStoveNo;
  26. row["batchNo"] = batchNo;
  27. }
  28. GridHelper.RefreshAndAutoSize(ultraGrid1);
  29. }
  30. public void Query(string judgeStoveNo, string batchNo, bool clearData,string plineCode)
  31. {
  32. DataTable dt = _d.GetTableByXmlId("JdgMchThreaderResult.getInfoByPline", judgeStoveNo, batchNo, plineCode);
  33. GridHelper.CopyDataToDatatable(dt, dataTable1, clearData);
  34. foreach (DataRow row in dataTable1.Rows)
  35. {
  36. if (row["batchNo"].ToString() != "") continue;
  37. row["judgeStoveNo"] = judgeStoveNo;
  38. row["batchNo"] = batchNo;
  39. }
  40. GridHelper.RefreshAndAutoSize(ultraGrid1);
  41. }
  42. public void ClearData()
  43. {
  44. this.dataTable1.Clear();
  45. }
  46. }
  47. }