QcmLgChemJudgeExceptionCtrl.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Tool;
  3. using Core.StlMes.Client.Judge.Commons;
  4. using Core.StlMes.Client.Judge.ViewModels;
  5. using CoreFS.CA06;
  6. using System;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Windows.Forms;
  10. namespace Core.StlMes.Client.Judge.Controls
  11. {
  12. public partial class QcmLgChemJudgeExceptionCtrl : UserControl
  13. {
  14. private Dal _d;
  15. public QcmLgChemJudgeExceptionCtrl(Control container, OpeBase ob)
  16. {
  17. InitializeComponent();
  18. _d = new Dal(ob);
  19. container.Controls.Add(this);
  20. this.Dock = DockStyle.Fill;
  21. this.BringToFront();
  22. EntityHelper.ShowGridCaption<QcmLgChemJudgeExceptionCtrlEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  23. }
  24. public void Query(string stoveNo, string processCode)
  25. {
  26. }
  27. public void QuerySteelMaking(string chemJudgeId)
  28. {
  29. DataTable dt = _d.GetTableByXmlId("QcmLgChemjudgeExceptionDAL.QuerySteelMaking", chemJudgeId);
  30. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  31. GridHelper.RefreshAndAutoSize(ultraGrid1);
  32. }
  33. public void Clear()
  34. {
  35. dataTable1.Clear();
  36. }
  37. private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  38. {
  39. Color red = Color.FromArgb(255, 106, 106);
  40. if (e.Row.GetValue("judgeChemCode") == "40740102")
  41. {
  42. e.Row.RowSelectorAppearance.BackColor = red;
  43. }
  44. }
  45. }
  46. }