ChemFileCtrl.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 ChemFileCtrl : UserControl
  10. {
  11. private Dal _d;
  12. private OpeBase ob;
  13. public ChemFileCtrl(Control container, OpeBase ob, bool showProcess)
  14. {
  15. InitializeComponent();
  16. this.ob = ob;
  17. container.Controls.Add(this);
  18. this.Dock = DockStyle.Fill;
  19. this.BringToFront();
  20. _d = new Dal(ob);
  21. if (!showProcess)
  22. {
  23. ultraGrid1.DisplayLayout.Bands[0].Columns["processDesc"].Hidden = true;
  24. }
  25. }
  26. public void QueryByBatchNo(string judgeApplyCode, string judgeStoveNo, string batchNo)
  27. {
  28. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getChemFile", judgeApplyCode, judgeStoveNo, batchNo);
  29. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  30. }
  31. public void QueryByBatchNoZc(string judgeStoveNo, string batchNo)
  32. {
  33. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getChemFileZc", judgeStoveNo, batchNo);
  34. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  35. }
  36. public void ClearData()
  37. {
  38. dataTable1.Clear();
  39. }
  40. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  41. {
  42. string filePath = ultraGrid1.ActiveRow.GetValue("specResultPath");
  43. FormFileDown formFile = new FormFileDown(this.ob, filePath);
  44. formFile.DeleteButton.Visible = false;
  45. formFile.Show();
  46. }
  47. }
  48. }