QcmBcJudgeCtrl.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 QcmBcJudgeCtrl : UserControl
  11. {
  12. private Dal _d;
  13. public QcmBcJudgeCtrl(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,string orderNo)
  22. {
  23. DataTable dt = _d.GetTableByXmlId("JdgQcmBcJudge.Query", batchNo, judgeStoveNo, judgeResult, timeBegin, timeEnd, plines.Length, plines, orderNo);
  24. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  25. GridHelper.RefreshAndAutoSize(entityGrid1);
  26. }
  27. public void ClearData()
  28. {
  29. dataTable1.Clear();
  30. }
  31. private void entityGrid1_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e)
  32. {
  33. GridHelper.RefreshAndAutoSize(entityGrid1);
  34. }
  35. private void entityGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  36. {
  37. Color red = Color.FromArgb(255, 106, 106);
  38. if (e.Row.GetValue("chemResultCode") == "40740102")
  39. {
  40. e.Row.Cells["chemResult"].Appearance.BackColor = red;
  41. }
  42. if (e.Row.GetValue("phyResultCode") == "40740202")
  43. {
  44. e.Row.Cells["phyResult"].Appearance.BackColor = red;
  45. }
  46. if (e.Row.GetValue("judgeResultCode") == "40740704")
  47. {
  48. e.Row.Cells["judgeResult"].Appearance.BackColor = red;
  49. }
  50. }
  51. }
  52. }