QcmZcJudgeCtrl.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.Drawing;
  7. using System.Windows.Forms;
  8. namespace Core.StlMes.Client.Judge.Controls
  9. {
  10. public partial class QcmZcJudgeCtrl : UserControl
  11. {
  12. private Dal _d;
  13. public QcmZcJudgeCtrl(Control container, OpeBase ob)
  14. {
  15. InitializeComponent();
  16. container.Controls.Add(this);
  17. this.Dock = DockStyle.Fill;
  18. this.BringToFront();
  19. _d = new Dal(ob);
  20. }
  21. public void Query(string batchNo, string judgeStoveNo, string judgeResult, string timeBegin, string timeEnd, string[] plines)
  22. {
  23. DataTable dt = _d.GetTableByXmlId("JdgQcmZcJudge.Query", batchNo, judgeStoveNo,
  24. judgeResult, timeBegin, timeEnd, plines.Length, plines);
  25. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  26. GridHelper.RefreshAndAutoSize(entityGrid1);
  27. }
  28. public void ClearData()
  29. {
  30. dataTable1.Clear();
  31. }
  32. private void entityGrid1_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e)
  33. {
  34. GridHelper.RefreshAndAutoSize(entityGrid1);
  35. }
  36. private void entityGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  37. {
  38. Color red = Color.FromArgb(255, 106, 106);
  39. if (e.Row.GetValue("chemResultCode") == "40740102")
  40. {
  41. e.Row.Cells["chemResult"].Appearance.BackColor = red;
  42. }
  43. if (e.Row.GetValue("phyResultCode") == "40740202")
  44. {
  45. e.Row.Cells["phyResult"].Appearance.BackColor = red;
  46. }
  47. if (e.Row.GetValue("judgeResultCode") == "40740704")
  48. {
  49. e.Row.Cells["judgeResult"].Appearance.BackColor = red;
  50. }
  51. }
  52. private void entityGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
  53. {
  54. }
  55. }
  56. }