FaceFileCtrl.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 FaceFileCtrl : UserControl
  10. {
  11. private Dal _d;
  12. private OpeBase ob;
  13. public FaceFileCtrl(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 Query(string judgeStoveNo)
  27. {
  28. DataTable dt = _d.GetTableByXmlId("QcmGpJugdeApplyDAL.queryFaceFile", judgeStoveNo);
  29. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  30. }
  31. public void QueryByBatchNo(string judgeApplyCode, string judgeStoveNo, string batchNo)
  32. {
  33. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getFaceFile", judgeApplyCode, judgeStoveNo, batchNo);
  34. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  35. }
  36. public void QueryByBatchNoZc(string judgeStoveNo, string batchNo)
  37. {
  38. DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getFaceFileZc", judgeStoveNo, batchNo);
  39. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  40. }
  41. public void ClearData()
  42. {
  43. dataTable1.Clear();
  44. }
  45. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  46. {
  47. string filePath = ultraGrid1.ActiveRow.GetValue("faceResultPath");
  48. FormFileDown formFile = new FormFileDown(this.ob, filePath);
  49. formFile.DeleteButton.Visible = false;
  50. formFile.Show();
  51. }
  52. }
  53. }