using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; namespace Core.LZMes.Client.UIL { public partial class UIL010010 : FrmBase { public UIL010010() { InitializeComponent(); } private void UIL010010_Load(object sender, EventArgs e) { this.DoQuery(); timer1.Start(); } private void DoQuery() { this.dataSet1.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIL.UIL01.UIL010010"; ccp.MethodName = "queryServerProgramStatus"; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); DataRowCollection drs = this.dataSet1.Tables[0].Rows; for (int i = 0; i < drs.Count; i++) { int status = int.Parse(drs[i]["STATUS"].ToString()); if(status < 1) { ultraGrid1.Rows[i].Appearance.BackColor = Color.Red; } else if(status == 1) { ultraGrid1.Rows[i].Appearance.BackColor = Color.Yellow; } else { ultraGrid1.Rows[i].Appearance.BackColor = Color.White; } } } private void timer1_Tick(object sender, EventArgs e) { DoQuery(); } } }