FrmChemPopup.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Server;
  3. using CoreFS.CA06;
  4. using Infragistics.Win.UltraWinGrid;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. namespace Core.StlMes.Client.Qcm
  9. {
  10. public partial class FrmChemPopup : FrmBase
  11. {
  12. public FrmChemPopup()
  13. {
  14. InitializeComponent();
  15. }
  16. private OpeBase _ob;
  17. public OpeBase Ob
  18. {
  19. get { return _ob; }
  20. set { _ob = value; }
  21. }
  22. private List<string> chenList;
  23. public List<string> ChenList
  24. {
  25. get { return chenList; }
  26. set { chenList = value; }
  27. }
  28. private void FrmChemPopup_Load(object sender, EventArgs e)
  29. {
  30. this.MaximizeBox = false;
  31. this.MinimizeBox = false;
  32. Query();
  33. }
  34. private void Query()
  35. {
  36. DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.CoreChemPopup.getData", null, this._ob);
  37. GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
  38. UltraGridColumn[] col = new UltraGridColumn[] { ultraGrid1.DisplayLayout.Bands[0].Columns["CHEM_FORMULA"] };
  39. GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, col);
  40. if (this.ChenList.Count > 0)
  41. {
  42. foreach (UltraGridRow row in ultraGrid1.Rows)
  43. {
  44. if (ChenList.Contains(row.Cells["CHEM_CODE"].Value.ToString()))
  45. {
  46. row.Cells["ISLINK"].Value = true;
  47. }
  48. }
  49. }
  50. ultraGrid1.UpdateData();
  51. }
  52. }
  53. }