MeltingStoveNoCtrl.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 MeltingStoveNoCtrl : UserControl
  11. {
  12. private Dal _d;
  13. public MeltingStoveNoCtrl(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 LgChemQuery(string stoveNo, string[] states = null, string plineCode = "", string judgeState = "", string timeB = "", string timeE = "")
  22. {
  23. if (states == null) states = new string[0];
  24. DataTable dt = _d.GetTableByXmlId("PlnSteelforfurnaceDAL.QueryLgChemMeltingStoveNo", states.Length, states,
  25. stoveNo, plineCode, judgeState, timeB, timeE);
  26. //_steelforfurnaceBLL.QueryMeltingStoveNo(states, stoveNo, plineCode);
  27. GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
  28. GridHelper.RefreshAndAutoSize(ultraGrid1);
  29. }
  30. public void LgColligateQuery(string stoveNo, string[] states = null, string plineCode = "", string judgeState = "", string timeB = "", string timeE = "")
  31. {
  32. if (states == null) states = new string[0];
  33. DataTable dt = _d.GetTableByXmlId("PlnSteelforfurnaceDAL.QueryLgColligateMeltingStoveNo", states.Length, states,
  34. stoveNo, plineCode, judgeState, timeB, timeE);
  35. //_steelforfurnaceBLL.QueryMeltingStoveNo(states, stoveNo, plineCode);
  36. GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
  37. GridHelper.RefreshAndAutoSize(ultraGrid1);
  38. }
  39. public void ZgColligateQuery(string stoveNo, string[] states = null, string plineCode = "")
  40. {
  41. if (states == null) states = new string[0];
  42. DataTable dt = _d.GetTableByXmlId("PlnSteelforfurnaceDAL.QueryZgColligateMeltingStoveNo", states.Length, states, stoveNo, plineCode);
  43. //_steelforfurnaceBLL.QueryMeltingStoveNo(states, stoveNo, plineCode);
  44. GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
  45. GridHelper.RefreshAndAutoSize(ultraGrid1);
  46. }
  47. private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  48. {
  49. if (e.Row.GetValue("stlIncisionCnt").ToString() != "0")
  50. {
  51. e.Row.Appearance.BackColor = Color.FromArgb(60, 179, 113);
  52. }
  53. }
  54. }
  55. }