QcmLgChemJudgeCtrl.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 QcmLgChemJudgeCtrl : UserControl
  13. {
  14. private Dal _d;
  15. public QcmLgChemJudgeCtrl(Control container, OpeBase ob)
  16. {
  17. InitializeComponent();
  18. _d = new Dal(ob);
  19. container.Controls.Add(this);
  20. this.Dock = DockStyle.Fill;
  21. EntityHelper.ShowGridCaption<QcmLgChemJudgeCtrlEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  22. }
  23. public void Query(string stoveNo, string processCode)
  24. {
  25. DataTable dt = _d.GetTableByXmlId("QcmLgChemjudgeDAL.Query", stoveNo, processCode);
  26. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  27. //qcmLgChemJudgeCtrlEntityBindingSource.DataSource = _lgChemJudgeBLL.Query(stoveNo, processCode);
  28. }
  29. public void QuerySteelMaking(string stoveNo, string judgeStoveNo, string judgeResult, string judgeTimeB, string judgeTimeE, string[] plines)
  30. {
  31. DataTable dt = _d.GetTableByXmlId("QcmLgChemjudgeDAL.QuerySteelMaking", "B", stoveNo, judgeStoveNo,
  32. judgeResult, judgeTimeB, judgeTimeE, plines.Length, plines);
  33. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  34. GridHelper.RefreshAndAutoSize(ultraGrid1);
  35. }
  36. //public void Judge(List<QcmJhyElementsEntity> jhyElements, QcmLgChemjudgeEntity lgChemJudge,
  37. // string stoveNo, string judgeStoveNo, string proPlanId, string cic, string judgeApplayCode,
  38. // string chemResultCode, JudgeType judgeType)
  39. //{
  40. // _lgChemJudgeBLL.Judge(jhyElements, lgChemJudge,stoveNo, judgeStoveNo, proPlanId, cic, judgeApplayCode, chemResultCode, judgeType);
  41. //}
  42. public void ClearData()
  43. {
  44. dataTable1.Clear();
  45. }
  46. private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
  47. {
  48. Color red = Color.FromArgb(255, 106, 106);
  49. if (e.Row.GetValue("judgeChemCode") == "40740102")
  50. {
  51. e.Row.Appearance.BackColor = red;
  52. }
  53. }
  54. }
  55. }