UIL010010.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. namespace Core.LZMes.Client.UIL
  11. {
  12. public partial class UIL010010 : FrmBase
  13. {
  14. public UIL010010()
  15. {
  16. InitializeComponent();
  17. }
  18. private void UIL010010_Load(object sender, EventArgs e)
  19. {
  20. this.DoQuery();
  21. timer1.Start();
  22. }
  23. private void DoQuery()
  24. {
  25. this.dataSet1.Tables[0].Clear();
  26. CoreClientParam ccp = new CoreClientParam();
  27. ccp.ServerName = "UIL.UIL01.UIL010010";
  28. ccp.MethodName = "queryServerProgramStatus";
  29. ccp.SourceDataTable = this.dataSet1.Tables[0];
  30. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  31. DataRowCollection drs = this.dataSet1.Tables[0].Rows;
  32. for (int i = 0; i < drs.Count; i++)
  33. {
  34. int status = int.Parse(drs[i]["STATUS"].ToString());
  35. if(status < 1)
  36. {
  37. ultraGrid1.Rows[i].Appearance.BackColor = Color.Red;
  38. }
  39. else if(status == 1)
  40. {
  41. ultraGrid1.Rows[i].Appearance.BackColor = Color.Yellow;
  42. }
  43. else
  44. {
  45. ultraGrid1.Rows[i].Appearance.BackColor = Color.White;
  46. }
  47. }
  48. }
  49. private void timer1_Tick(object sender, EventArgs e)
  50. {
  51. DoQuery();
  52. }
  53. }
  54. }