FaceInfoCtrl.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Tool;
  3. using Core.StlMes.Client.Judge.Commons;
  4. using CoreFS.CA06;
  5. using System;
  6. using System.Data;
  7. using System.Windows.Forms;
  8. namespace Core.StlMes.Client.Judge.Controls
  9. {
  10. public partial class FaceInfoCtrl : UserControl
  11. {
  12. private Dal _d;
  13. private string _processCode = "";
  14. public FaceInfoCtrl(Control container, OpeBase ob, string processCode)
  15. {
  16. InitializeComponent();
  17. _d = new Dal(ob);
  18. _processCode = processCode;
  19. container.Controls.Add(this);
  20. this.Dock = DockStyle.Fill;
  21. }
  22. public void Query(string judgeStoveNo, string batchNo, string zpMLh)
  23. {
  24. CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.getFaceInfo",
  25. judgeStoveNo, batchNo, _processCode, zpMLh);
  26. if (ccp.ReturnInfo.ToString2() != "")
  27. {
  28. MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2());
  29. return;
  30. }
  31. DataTable dt = JsonHelper.toTable(ccp.ReturnObject.ToString2());
  32. if (dt == null || dt.Rows.Count == 0) return;
  33. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  34. foreach (DataRow row in dataTable1.Rows)
  35. {
  36. if (row["judgeStoveNo"].ToString() != "") continue;
  37. row["judgeStoveNo"] = judgeStoveNo;
  38. row["batchNo"] = batchNo;
  39. }
  40. GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "reportPath");
  41. }
  42. public void Query(string judgeStoveNo, string batchNo, string zpMLh,string plineCode)
  43. {
  44. CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.getFaceInfoByPline",
  45. judgeStoveNo, batchNo, _processCode, zpMLh, plineCode);
  46. if (ccp.ReturnInfo.ToString2() != "")
  47. {
  48. MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2());
  49. return;
  50. }
  51. DataTable dt = JsonHelper.toTable(ccp.ReturnObject.ToString2());
  52. if (dt.Rows.Count == 0) return;
  53. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  54. foreach (DataRow row in dataTable1.Rows)
  55. {
  56. if (row["judgeStoveNo"].ToString() != "") continue;
  57. row["judgeStoveNo"] = judgeStoveNo;
  58. row["batchNo"] = batchNo;
  59. }
  60. GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "reportPath");
  61. }
  62. public void ClearData()
  63. {
  64. this.dataTable1.Clear();
  65. }
  66. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  67. {
  68. string filePath = ultraGrid1.ActiveRow.GetValue("reportPath");
  69. FormFileDown formFile = new FormFileDown(_d.Ob, filePath);
  70. formFile.DeleteButton.Visible = false;
  71. formFile.Show();
  72. }
  73. }
  74. }