frmOggHistory.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. namespace Core.LgMes.Client.LgResMgt
  9. {
  10. public partial class frmOggHistory : Core.Mes.Client.Common.frmStyleBase
  11. {
  12. public frmOggHistory()
  13. {
  14. InitializeComponent();
  15. }
  16. public DataTable dtOggHistory; //氧枪氧枪信息
  17. private void frmOggHistory_Load(object sender, EventArgs e)
  18. {
  19. if (dtOggHistory != null)
  20. {
  21. dsYQ.Tables[0].Clear();
  22. dsYQ.Tables[0].Merge(dtOggHistory);
  23. //this.ultraGrid1.DataSource = dtOggHistory;
  24. //ultraGrid1.DataBind();
  25. }
  26. }
  27. /// <summary>
  28. /// 初始化Grid样式
  29. /// </summary>
  30. private void InitializeGrid()
  31. {
  32. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingvalue"].Width = 120;
  33. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingvalue"].Header.Caption = "氧枪枪位";
  34. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingvalue"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  35. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingdate"].Header.Caption = "采样时间";
  36. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingdate"].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  37. ultraGrid1.DisplayLayout.Bands[0].Columns["samplingdate"].Width = 150;
  38. }
  39. }
  40. }