DetectFileCtrl.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 DetectFileCtrl : UserControl
  10. {
  11. private Dal _d;
  12. private OpeBase ob;
  13. public DetectFileCtrl(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. ultraGrid1.DisplayLayout.Bands[0].Columns["detectFile2"].Hidden = true;
  25. }
  26. }
  27. public void Query(string judgeStoveNo)
  28. {
  29. DataTable dt = _d.GetTableByXmlId("QcmGpJugdeApplyDAL.getDetectFile", judgeStoveNo);
  30. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  31. }
  32. public void QueryBatchNo(string judgeApplyCode, string judgeStoveNo, string batchNo)
  33. {
  34. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getDetectFile", judgeApplyCode, judgeStoveNo, batchNo);
  35. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  36. }
  37. public void QueryBatchNoZc(string judgeStoveNo, string batchNo)
  38. {
  39. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getDetectFileZc", judgeStoveNo, batchNo);
  40. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  41. }
  42. private void DealWithDetectFile(DataTable dt)
  43. {
  44. DataTable dtNew = dt.Clone();
  45. //foreach (DataRow dr in dt)
  46. //{
  47. // List<FileBean> fileBeans = dr["detectResultPath"].ToString();
  48. //}
  49. }
  50. public void ClearData()
  51. {
  52. dataTable1.Clear();
  53. }
  54. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  55. {
  56. if (ultraGrid1.ActiveCell.Column.Key == "detectFile")
  57. {
  58. string filePath = ultraGrid1.ActiveRow.GetValue("detectResultPath");
  59. FormFileDown formFile = new FormFileDown(this.ob, filePath);
  60. formFile.DeleteButton.Visible = false;
  61. formFile.Show();
  62. }
  63. else
  64. {
  65. string filePath = ultraGrid1.ActiveRow.GetValue("detectResultPath2");
  66. FormFileDown formFile = new FormFileDown(this.ob, filePath);
  67. formFile.DeleteButton.Visible = false;
  68. formFile.Show();
  69. }
  70. }
  71. }
  72. }