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