PathInfoCtrl.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.StlMes.Client.Judge.Commons;
  3. using CoreFS.CA06;
  4. using System;
  5. using System.Data;
  6. using System.Windows.Forms;
  7. namespace Core.StlMes.Client.Judge.Controls
  8. {
  9. public partial class PathInfoCtrl : UserControl
  10. {
  11. private Dal _d;
  12. public PathInfoCtrl(Control container, OpeBase ob)
  13. {
  14. InitializeComponent();
  15. container.Controls.Add(this);
  16. this.Dock = DockStyle.Fill;
  17. _d = new Dal(ob);
  18. }
  19. public void Query(string processCode, string judgeStoveNo, string batchNo, bool clearData)
  20. {
  21. DataTable dt = _d.GetTableByXmlId("JdgMchPathResult.getInfo", judgeStoveNo, batchNo);
  22. GridHelper.CopyDataToDatatable(dt, dataTable1, clearData);
  23. foreach (DataRow row in dataTable1.Rows)
  24. {
  25. if (row["batchNo"].ToString() != "") continue;
  26. row["judgeStoveNo"] = judgeStoveNo;
  27. row["batchNo"] = batchNo;
  28. }
  29. GridHelper.RefreshAndAutoSize(ultraGrid1);
  30. }
  31. public void Query(string processCode, string judgeStoveNo, string batchNo, bool clearData, string plineCode)
  32. {
  33. DataTable dt = _d.GetTableByXmlId("JdgMchPathResult.getInfoByPline", judgeStoveNo, batchNo, plineCode);
  34. GridHelper.CopyDataToDatatable(dt, dataTable1, clearData);
  35. foreach (DataRow row in dataTable1.Rows)
  36. {
  37. if (row["batchNo"].ToString() != "") continue;
  38. row["judgeStoveNo"] = judgeStoveNo;
  39. row["batchNo"] = batchNo;
  40. }
  41. GridHelper.RefreshAndAutoSize(ultraGrid1);
  42. }
  43. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  44. {
  45. string filePath = ultraGrid1.ActiveRow.GetValue("reportPath");
  46. FormFileDown formFile = new FormFileDown(_d.Ob, filePath);
  47. formFile.DeleteButton.Visible = false;
  48. formFile.Show();
  49. }
  50. public void ClearData()
  51. {
  52. this.dataTable1.Clear();
  53. }
  54. }
  55. }