ProcessInfoCtrl.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 ProcessInfoCtrl : UserControl
  10. {
  11. private readonly Dal _d;
  12. public ProcessInfoCtrl(Control container, OpeBase ob, bool showProcess)
  13. {
  14. InitializeComponent();
  15. _d = new Dal(ob);
  16. container.Controls.Add(this);
  17. Dock = DockStyle.Fill;
  18. }
  19. public void Query(string judgeApplyCode, string judgeStoveNo, string batchNo, bool clearData)
  20. {
  21. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getProcessInfo", judgeApplyCode, judgeStoveNo, batchNo);
  22. GridHelper.CopyDataToDatatable(dt, dataTable1, clearData);
  23. foreach (DataRow row in dataTable1.Rows)
  24. {
  25. if (row["judgeStoveNo"].ToString() != "") continue;
  26. row["judgeStoveNo"] = judgeStoveNo;
  27. row["batchNo"] = batchNo;
  28. }
  29. GridHelper.RefreshAndAutoSize(ultraGrid1);
  30. }
  31. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  32. {
  33. string filePath = ultraGrid1.ActiveRow.GetValue("processResultPath");
  34. FormFileDown formFile = new FormFileDown(_d.Ob, filePath);
  35. formFile.DeleteButton.Visible = false;
  36. formFile.Show();
  37. }
  38. public void ClearData()
  39. {
  40. dataTable1.Clear();
  41. }
  42. }
  43. }