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 System.Collections; using CoreFS.CA06; namespace Core.LZMes.Client.UIK { public partial class UIK050110 : FrmBase { public UIK050110() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; } } private void DoQuery() { try { this.dataSet1.Tables[0].Clear(); DataTable dt = new DataTable(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIK.UIK05.UIK050110"; ccp.MethodName = "Query_ICCoil"; ccp.SourceDataTable = dt; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); // MessageBox.Show("数据行:" + dt.Rows.Count); for (int i = 0; i < dt.Rows.Count; i++) { this.text_coil1.Text = dt.Rows[i]["COIL_ID1"].ToString(); if (this.text_coil1.Text != "" && this.text_coil1.Text.Length == 13 && this.text_coil1.Text.Contains("R")) { this.label_color1.BackColor = Color.Green; } else { this.label_color1.BackColor = Color.Chocolate; } this.text_coil2.Text = dt.Rows[i]["COIL_ID2"].ToString(); if (this.text_coil2.Text != "" && this.text_coil2.Text.Length == 13 && this.text_coil2.Text.Contains("R")) { this.label_color2.BackColor = Color.Green; } else { this.label_color2.BackColor = Color.Chocolate; } this.text_coil3.Text = dt.Rows[i]["COIL_ID3"].ToString(); if (this.text_coil3.Text != "" && this.text_coil3.Text.Length == 13 && this.text_coil3.Text.Contains("R")) { this.label_color3.BackColor = Color.Green; } else { this.label_color3.BackColor = Color.Chocolate; } this.text_coil4.Text = dt.Rows[i]["COIL_ID4"].ToString(); if (this.text_coil4.Text != "" && this.text_coil4.Text.Length == 13 && this.text_coil4.Text.Contains("R")) { this.label_color4.BackColor = Color.Green; } else { this.label_color4.BackColor = Color.Chocolate; } this.text_coil5.Text = dt.Rows[i]["COIL_ID5"].ToString(); if (this.text_coil5.Text != "" && this.text_coil5.Text.Length == 13 && this.text_coil5.Text.Contains("R")) { this.label_color5.BackColor = Color.Green; } else { this.label_color5.BackColor = Color.Chocolate; } this.text_coil6.Text = dt.Rows[i]["COIL_ID6"].ToString(); if (this.text_coil6.Text != "" && this.text_coil6.Text.Length == 13 && this.text_coil6.Text.Contains("R")) { this.label_color6.BackColor = Color.Green; } else { this.label_color6.BackColor = Color.Chocolate; } this.text_coil7.Text = dt.Rows[i]["COIL_ID7"].ToString(); if (this.text_coil7.Text != "" && this.text_coil7.Text.Length == 13 && this.text_coil7.Text.Contains("R")) { this.label_color7.BackColor = Color.Green; } else { this.label_color7.BackColor = Color.Chocolate; } this.text_coil8.Text = dt.Rows[i]["COIL_ID8"].ToString(); if (this.text_coil8.Text != "" && this.text_coil8.Text.Length == 13 && this.text_coil8.Text.Contains("R")) { this.label_color8.BackColor = Color.Green; } else { this.label_color8.BackColor = Color.Chocolate; } this.text_coil9.Text = dt.Rows[i]["COIL_ID9"].ToString(); if (this.text_coil9.Text != "" && this.text_coil9.Text.Length == 13 && this.text_coil9.Text.Contains("R")) { this.label_color9.BackColor = Color.Green; } else { this.label_color9.BackColor = Color.Chocolate; } this.text_coil10.Text = dt.Rows[i]["COIL_ID10"].ToString(); if (this.text_coil10.Text != "" && this.text_coil10.Text.Length == 13 && this.text_coil10.Text.Contains("R")) { this.label_color10.BackColor = Color.Green; } else { this.label_color10.BackColor = Color.Chocolate; } this.text_coil11.Text = dt.Rows[i]["COIL_ID11"].ToString(); if (this.text_coil11.Text != "" && this.text_coil11.Text.Length == 13 && this.text_coil11.Text.Contains("R")) { this.label_color11.BackColor = Color.Green; } else { this.label_color11.BackColor = Color.Chocolate; } this.text_coil12.Text = dt.Rows[i]["COIL_ID12"].ToString(); if (this.text_coil12.Text != "" && this.text_coil12.Text.Length == 13 && this.text_coil12.Text.Contains("R")) { this.label_color12.BackColor = Color.Green; } else { this.label_color12.BackColor = Color.Chocolate; } this.text_coil13.Text = dt.Rows[i]["COIL_ID13"].ToString(); if (this.text_coil13.Text != "" && this.text_coil13.Text.Length == 13 && this.text_coil13.Text.Contains("R")) { this.label_color13.BackColor = Color.Green; } else { this.label_color13.BackColor = Color.Chocolate; } //this.text_coil12.Text = dt.Rows[i]["COIL_ID12"].ToString(); //if (this.text_coil12.Text != "") //{ // this.label_color12.BackColor = Color.Green; //} this.text_coil14.Text = dt.Rows[i]["COIL_ID14"].ToString(); if (this.text_coil14.Text != "" && this.text_coil14.Text.Length == 13 && this.text_coil14.Text.Contains("R")) { this.label_color14.BackColor = Color.Green; } else { this.label_color14.BackColor = Color.Chocolate; } this.text_coil15.Text = dt.Rows[i]["COIL_ID15"].ToString(); if (this.text_coil15.Text != "" && this.text_coil15.Text.Length == 13 && this.text_coil15.Text.Contains("R")) { this.label_color15.BackColor = Color.Green; } else { this.label_color15.BackColor = Color.Chocolate; } this.text_coil16.Text = dt.Rows[i]["COIL_ID16"].ToString(); if (this.text_coil16.Text != "" && this.text_coil16.Text.Length == 13 && this.text_coil16.Text.Contains("R")) { this.label_color16.BackColor = Color.Green; } else { this.label_color16.BackColor = Color.Chocolate; } this.text_coil17.Text = dt.Rows[i]["COIL_ID17"].ToString(); if (this.text_coil17.Text != "" && this.text_coil17.Text.Length == 13 && this.text_coil17.Text.Contains("R")) { this.label_color17.BackColor = Color.Green; } else { this.label_color17.BackColor = Color.Chocolate; } this.text_coil18.Text = dt.Rows[i]["COIL_ID18"].ToString(); if (this.text_coil18.Text != "" && this.text_coil18.Text.Length == 13 && this.text_coil18.Text.Contains("R")) { this.label_color18.BackColor = Color.Green; } else { this.label_color18.BackColor = Color.Chocolate; } this.text_coil19.Text = dt.Rows[i]["COIL_ID19"].ToString(); if (this.text_coil19.Text != "" && this.text_coil19.Text.Length == 13 && this.text_coil19.Text.Contains("R")) { this.label_color19.BackColor = Color.Green; } else { this.label_color19.BackColor = Color.Chocolate; } this.text_coil20.Text = dt.Rows[i]["COIL_ID20"].ToString(); if (this.text_coil20.Text != "" && this.text_coil20.Text.Length == 13 && this.text_coil20.Text.Contains("R")) { this.label_color20.BackColor = Color.Green; } else { this.label_color20.BackColor = Color.Chocolate; } this.text_coil21.Text = dt.Rows[i]["COIL_ID21"].ToString(); if (this.text_coil21.Text != "" && this.text_coil21.Text.Length == 13 && this.text_coil21.Text.Contains("R")) { this.label_color21.BackColor = Color.Green; } else { this.label_color21.BackColor = Color.Chocolate; } this.text_coil22.Text = dt.Rows[i]["COIL_ID22"].ToString(); if (this.text_coil22.Text != "" && this.text_coil22.Text.Length == 13 && this.text_coil22.Text.Contains("R")) { this.label_color22.BackColor = Color.Green; } else { this.label_color22.BackColor = Color.Chocolate; } this.text_coil23.Text = dt.Rows[i]["COIL_ID23"].ToString(); if (this.text_coil23.Text != "" && this.text_coil23.Text.Length == 13 && this.text_coil23.Text.Contains("R")) { this.label_color23.BackColor = Color.Green; } else { this.label_color23.BackColor = Color.Chocolate; } this.text_coil24.Text = dt.Rows[i]["COIL_ID24"].ToString(); if (this.text_coil24.Text != "" && this.text_coil24.Text.Length == 13 && this.text_coil24.Text.Contains("R")) { this.label_color24.BackColor = Color.Green; } else { this.label_color24.BackColor = Color.Chocolate; } this.text_coil25.Text = dt.Rows[i]["COIL_ID25"].ToString(); if (this.text_coil25.Text != "" && this.text_coil25.Text.Length == 13 && this.text_coil25.Text.Contains("R")) { this.label_color25.BackColor = Color.Green; } else { this.label_color25.BackColor = Color.Chocolate; } this.text_coil26.Text = dt.Rows[i]["COIL_ID26"].ToString(); if (this.text_coil26.Text != "" && this.text_coil26.Text.Length == 13 && this.text_coil26.Text.Contains("R")) { this.label_color26.BackColor = Color.Green; } else { this.label_color26.BackColor = Color.Chocolate; } this.text_coil27.Text = dt.Rows[i]["COIL_ID27"].ToString(); if (this.text_coil27.Text != "" && this.text_coil27.Text.Length == 13 && this.text_coil27.Text.Contains("R")) { this.label_color27.BackColor = Color.Green; } else { this.label_color27.BackColor = Color.Chocolate; } this.text_coil28.Text = dt.Rows[i]["COIL_ID28"].ToString(); if (this.text_coil28.Text != "" && this.text_coil28.Text.Length == 13 && this.text_coil28.Text.Contains("R")) { this.label_color28.BackColor = Color.Green; } else { this.label_color28.BackColor = Color.Chocolate; } this.text_coil29.Text = dt.Rows[i]["COIL_ID29"].ToString(); if (this.text_coil29.Text != "" && this.text_coil29.Text.Length == 13 && this.text_coil29.Text.Contains("R")) { this.label_color29.BackColor = Color.Green; } else { this.label_color29.BackColor = Color.Chocolate; } this.text_coil30.Text = dt.Rows[i]["COIL_ID30"].ToString(); if (this.text_coil30.Text != "" && this.text_coil30.Text.Length == 13 && this.text_coil30.Text.Contains("R")) { this.label_color30.BackColor = Color.Green; } else { this.label_color30.BackColor = Color.Chocolate; } this.text_coil31.Text = dt.Rows[i]["COIL_ID31"].ToString(); if (this.text_coil31.Text != "" && this.text_coil31.Text.Length == 13 && this.text_coil31.Text.Contains("R")) { this.label_color31.BackColor = Color.Green; } else { this.label_color31.BackColor = Color.Chocolate; } this.text_coil32.Text = dt.Rows[i]["COIL_ID32"].ToString(); if (this.text_coil32.Text != "" && this.text_coil32.Text.Length == 13 && this.text_coil32.Text.Contains("R")) { this.label_color32.BackColor = Color.Green; } else { this.label_color32.BackColor = Color.Chocolate; } this.text_coil33.Text = dt.Rows[i]["COIL_ID33"].ToString(); if (this.text_coil33.Text != "" && this.text_coil33.Text.Length == 13 && this.text_coil33.Text.Contains("R")) { this.label_color33.BackColor = Color.Green; } else { this.label_color33.BackColor = Color.Chocolate; } this.text_coil34.Text = dt.Rows[i]["COIL_ID34"].ToString(); if (this.text_coil34.Text != "" && this.text_coil34.Text.Length == 13 && this.text_coil34.Text.Contains("R")) { this.label_color34.BackColor = Color.Green; } else { this.label_color34.BackColor = Color.Chocolate; } this.text_coil35.Text = dt.Rows[i]["COIL_ID35"].ToString(); if (this.text_coil35.Text != "" && this.text_coil35.Text.Length == 13 && this.text_coil35.Text.Contains("R")) { this.label_color35.BackColor = Color.Green; } else { this.label_color35.BackColor = Color.Chocolate; } this.text_coil36.Text = dt.Rows[i]["COIL_ID36"].ToString(); if (this.text_coil36.Text != "" && this.text_coil36.Text.Length == 13 && this.text_coil36.Text.Contains("R")) { this.label_color36.BackColor = Color.Green; } else { this.label_color36.BackColor = Color.Chocolate; } this.text_coil37.Text = dt.Rows[i]["COIL_ID37"].ToString(); if (this.text_coil37.Text != "" && this.text_coil37.Text.Length == 13 && this.text_coil37.Text.Contains("R")) { this.label_color37.BackColor = Color.Green; } else { this.label_color37.BackColor = Color.Chocolate; } this.text_coil40.Text = dt.Rows[i]["COIL_ID40"].ToString(); if (this.text_coil40.Text != "" && this.text_coil40.Text.Length == 13 && this.text_coil40.Text.Contains("R")) { this.label_color40.BackColor = Color.Green; } else { this.label_color40.BackColor = Color.Chocolate; } this.text_coil38.Text = dt.Rows[i]["COIL_ID38"].ToString(); if (this.text_coil38.Text != "" && this.text_coil38.Text.Length == 13 && this.text_coil38.Text.Contains("R")) { this.label_color38.BackColor = Color.Green; } else { this.label_color38.BackColor = Color.Chocolate; } this.text_coil39.Text = dt.Rows[i]["COIL_ID39"].ToString(); if (this.text_coil39.Text != "" && this.text_coil39.Text.Length == 13 && this.text_coil39.Text.Contains("R")) { this.label_color39.BackColor = Color.Green; } else { this.label_color39.BackColor = Color.Chocolate; } this.text_coil41.Text = dt.Rows[i]["COIL_ID41"].ToString(); if (this.text_coil41.Text != "" && this.text_coil41.Text.Length == 13 && this.text_coil41.Text.Contains("R")) { this.label_color41.BackColor = Color.Green; } else { this.label_color41.BackColor = Color.Chocolate; } this.text_coil42.Text = dt.Rows[i]["COIL_ID42"].ToString(); if (this.text_coil42.Text != "" && this.text_coil42.Text.Length == 13 && this.text_coil42.Text.Contains("R")) { this.label_color42.BackColor = Color.Green; } else { this.label_color42.BackColor = Color.Chocolate; } this.text_coil43.Text = dt.Rows[i]["COIL_ID43"].ToString(); if (this.text_coil43.Text != "" && this.text_coil43.Text.Length == 13 && this.text_coil43.Text.Contains("R")) { this.label_color43.BackColor = Color.Green; } else { this.label_color43.BackColor = Color.Chocolate; } this.text_coil44.Text = dt.Rows[i]["COIL_ID44"].ToString(); if (this.text_coil44.Text != "" && this.text_coil44.Text.Length == 13 && this.text_coil44.Text.Contains("R")) { this.label_color44.BackColor = Color.Green; } else { this.label_color44.BackColor = Color.Chocolate; } this.text_coil45.Text = dt.Rows[i]["COIL_ID45"].ToString(); if (this.text_coil45.Text != "" && this.text_coil45.Text.Length == 13 && this.text_coil45.Text.Contains("R")) { this.label_color45.BackColor = Color.Green; } else { this.label_color45.BackColor = Color.Chocolate; } this.text_coil46.Text = dt.Rows[i]["COIL_ID46"].ToString(); if (this.text_coil46.Text != "" && this.text_coil46.Text.Length == 13 && this.text_coil46.Text.Contains("R")) { this.label_color46.BackColor = Color.Green; } else { this.label_color46.BackColor = Color.Chocolate; } this.text_coil47.Text = dt.Rows[i]["COIL_ID47"].ToString(); if (this.text_coil47.Text != "" && this.text_coil47.Text.Length == 13 && this.text_coil47.Text.Contains("R")) { this.label_color47.BackColor = Color.Green; } else { this.label_color47.BackColor = Color.Chocolate; } this.text_coil48.Text = dt.Rows[i]["COIL_ID48"].ToString(); if (this.text_coil48.Text != "" && this.text_coil48.Text.Length == 13 && this.text_coil48.Text.Contains("R")) { this.label_color48.BackColor = Color.Green; } else { this.label_color48.BackColor = Color.Chocolate; } this.text_coil49.Text = dt.Rows[i]["COIL_ID49"].ToString(); if (this.text_coil49.Text != "" && this.text_coil49.Text.Length == 13 && this.text_coil49.Text.Contains("R")) { this.label_color49.BackColor = Color.Green; } else { this.label_color49.BackColor = Color.Chocolate; } this.text_coil50.Text = dt.Rows[i]["COIL_ID50"].ToString(); if (this.text_coil50.Text != "" && this.text_coil50.Text.Length == 13 && this.text_coil50.Text.Contains("R")) { this.label_color50.BackColor = Color.Green; } else { this.label_color50.BackColor = Color.Chocolate; } this.text_coil51.Text = dt.Rows[i]["COIL_ID51"].ToString(); if (this.text_coil51.Text != "" && this.text_coil51.Text.Length == 13 && this.text_coil51.Text.Contains("R")) { this.label_color51.BackColor = Color.Green; } else { this.label_color51.BackColor = Color.Chocolate; } this.text_coil52.Text = dt.Rows[i]["COIL_ID52"].ToString(); if (this.text_coil52.Text != "" && this.text_coil52.Text.Length == 13 && this.text_coil52.Text.Contains("R")) { this.label_color52.BackColor = Color.Green; } else { this.label_color52.BackColor = Color.Chocolate; } this.text_coil53.Text = dt.Rows[i]["COIL_ID53"].ToString(); if (this.text_coil53.Text != "" && this.text_coil53.Text.Length == 13 && this.text_coil53.Text.Contains("R")) { this.label_color53.BackColor = Color.Green; } else { this.label_color53.BackColor = Color.Chocolate; } this.text_coil54.Text = dt.Rows[i]["COIL_ID54"].ToString(); if (this.text_coil54.Text != "" && this.text_coil54.Text.Length == 13 && this.text_coil54.Text.Contains("R")) { this.label_color54.BackColor = Color.Green; } else { this.label_color54.BackColor = Color.Chocolate; } this.text_coil55.Text = dt.Rows[i]["COIL_ID55"].ToString(); if (this.text_coil55.Text != "" && this.text_coil55.Text.Length == 13 && this.text_coil55.Text.Contains("R")) { this.label_color55.BackColor = Color.Green; } else { this.label_color55.BackColor = Color.Chocolate; } this.text_coil56.Text = dt.Rows[i]["COIL_ID56"].ToString(); if (this.text_coil56.Text != "" && this.text_coil56.Text.Length == 13 && this.text_coil56.Text.Contains("R")) { this.label_color56.BackColor = Color.Green; } else { this.label_color56.BackColor = Color.Chocolate; } this.text_coil57.Text = dt.Rows[i]["COIL_ID57"].ToString(); if (this.text_coil57.Text != "" && this.text_coil57.Text.Length == 13 && this.text_coil57.Text.Contains("R")) { this.label_color57.BackColor = Color.Green; } else { this.label_color57.BackColor = Color.Chocolate; } this.text_coil58.Text = dt.Rows[i]["COIL_ID58"].ToString(); if (this.text_coil58.Text != "" && this.text_coil58.Text.Length == 13 && this.text_coil58.Text.Contains("R")) { this.label_color58.BackColor = Color.Green; } else { this.label_color58.BackColor = Color.Chocolate; } this.text_coil59.Text = dt.Rows[i]["COIL_ID59"].ToString(); if (this.text_coil59.Text != "" && this.text_coil59.Text.Length == 13 && this.text_coil59.Text.Contains("R")) { this.label_color59.BackColor = Color.Green; } else { this.label_color59.BackColor = Color.Chocolate; } this.text_coil60.Text = dt.Rows[i]["COIL_ID60"].ToString(); if (this.text_coil60.Text != "" && this.text_coil60.Text.Length == 13 && this.text_coil60.Text.Contains("R")) { this.label_color60.BackColor = Color.Green; } else { this.label_color60.BackColor = Color.Chocolate; } this.text_coil61.Text = dt.Rows[i]["COIL_ID61"].ToString(); if (this.text_coil61.Text != "" && this.text_coil61.Text.Length == 13 && this.text_coil61.Text.Contains("R")) { this.label_color61.BackColor = Color.Green; } else { this.label_color61.BackColor = Color.Chocolate; } this.text_coil62.Text = dt.Rows[i]["COIL_ID62"].ToString(); if (this.text_coil62.Text != "" && this.text_coil62.Text.Length == 13 && this.text_coil62.Text.Contains("R")) { this.label_color62.BackColor = Color.Green; } else { this.label_color62.BackColor = Color.Chocolate; } this.text_coil63.Text = dt.Rows[i]["COIL_ID63"].ToString(); if (this.text_coil63.Text != "" && this.text_coil63.Text.Length == 13 && this.text_coil63.Text.Contains("R")) { this.label_color63.BackColor = Color.Green; } else { this.label_color63.BackColor = Color.Chocolate; } this.text_coil64.Text = dt.Rows[i]["COIL_ID64"].ToString(); if (this.text_coil64.Text != "" && this.text_coil64.Text.Length == 13 && this.text_coil64.Text.Contains("R")) { this.label_color64.BackColor = Color.Green; } else { this.label_color64.BackColor = Color.Chocolate; } this.text_coil65.Text = dt.Rows[i]["COIL_ID65"].ToString(); if (this.text_coil65.Text != "" && this.text_coil65.Text.Length == 13 && this.text_coil65.Text.Contains("R")) { this.label_color65.BackColor = Color.Green; } else { this.label_color65.BackColor = Color.Chocolate; } this.text_coil66.Text = dt.Rows[i]["COIL_ID66"].ToString(); if (this.text_coil66.Text != "" && this.text_coil66.Text.Length == 13 && this.text_coil66.Text.Contains("R")) { this.label_color66.BackColor = Color.Green; } else { this.label_color66.BackColor = Color.Chocolate; } this.text_coil67.Text = dt.Rows[i]["COIL_ID67"].ToString(); if (this.text_coil67.Text != "" && this.text_coil67.Text.Length == 13 && this.text_coil67.Text.Contains("R")) { this.label_color67.BackColor = Color.Green; } else { this.label_color67.BackColor = Color.Chocolate; } this.text_coil68.Text = dt.Rows[i]["COIL_ID68"].ToString(); if (this.text_coil68.Text != "" && this.text_coil68.Text.Length == 13 && this.text_coil68.Text.Contains("R")) { this.label_color68.BackColor = Color.Green; } else { this.label_color68.BackColor = Color.Chocolate; } this.text_coil69.Text = dt.Rows[i]["COIL_ID69"].ToString(); if (this.text_coil69.Text != "" && this.text_coil69.Text.Length == 13 && this.text_coil69.Text.Contains("R")) { this.label_color69.BackColor = Color.Green; } else { this.label_color69.BackColor = Color.Chocolate; } this.text_coil70.Text = dt.Rows[i]["COIL_ID70"].ToString(); if (this.text_coil70.Text != "" && this.text_coil70.Text.Length == 13 && this.text_coil70.Text.Contains("R")) { this.label_color70.BackColor = Color.Green; } else { this.label_color70.BackColor = Color.Chocolate; } this.text_coil73.Text = dt.Rows[i]["COIL_ID73"].ToString(); if (this.text_coil73.Text != "" && this.text_coil73.Text.Length == 13 && this.text_coil73.Text.Contains("R")) { this.label_color73.BackColor = Color.Green; } else { this.label_color73.BackColor = Color.Chocolate; } this.text_coil74.Text = dt.Rows[i]["COIL_ID74"].ToString(); if (this.text_coil74.Text != "" && this.text_coil74.Text.Length == 13 && this.text_coil74.Text.Contains("R")) { this.label_color74.BackColor = Color.Green; } else { this.label_color74.BackColor = Color.Chocolate; } this.text_coil75.Text = dt.Rows[i]["COIL_ID75"].ToString(); if (this.text_coil75.Text != "" && this.text_coil75.Text.Length == 13 && this.text_coil75.Text.Contains("R")) { this.label_color75.BackColor = Color.Green; } else { this.label_color75.BackColor = Color.Chocolate; } this.text_coil76.Text = dt.Rows[i]["COIL_ID76"].ToString(); if (this.text_coil76.Text != "" && this.text_coil76.Text.Length == 13 && this.text_coil76.Text.Contains("R")) { this.label_color76.BackColor = Color.Green; } else { this.label_color76.BackColor = Color.Chocolate; } this.text_coil77.Text = dt.Rows[i]["COIL_ID77"].ToString(); if (this.text_coil77.Text != "" && this.text_coil77.Text.Length == 13 && this.text_coil77.Text.Contains("R")) { this.label_color77.BackColor = Color.Green; } else { this.label_color77.BackColor = Color.Chocolate; } this.text_coil78.Text = dt.Rows[i]["COIL_ID78"].ToString(); if (this.text_coil78.Text != "" && this.text_coil78.Text.Length == 13 && this.text_coil78.Text.Contains("R")) { this.label_color78.BackColor = Color.Green; } else { this.label_color78.BackColor = Color.Chocolate; } this.text_coil79.Text = dt.Rows[i]["COIL_ID79"].ToString(); if (this.text_coil79.Text != "" && this.text_coil79.Text.Length == 13 && this.text_coil79.Text.Contains("R")) { this.label_color79.BackColor = Color.Green; } else { this.label_color79.BackColor = Color.Chocolate; } this.text_coil80.Text = dt.Rows[i]["COIL_ID80"].ToString(); if (this.text_coil80.Text != "" && this.text_coil80.Text.Length == 13 && this.text_coil80.Text.Contains("R")) { this.label_color80.BackColor = Color.Green; } else { this.label_color80.BackColor = Color.Chocolate; } this.text_coil81.Text = dt.Rows[i]["COIL_ID81"].ToString(); if (this.text_coil81.Text != "" && this.text_coil81.Text.Length == 13 && this.text_coil81.Text.Contains("R")) { this.label_color81.BackColor = Color.Green; } else { this.label_color81.BackColor = Color.Chocolate; } this.text_coil82.Text = dt.Rows[i]["COIL_ID82"].ToString(); if (this.text_coil82.Text != "" && this.text_coil82.Text.Length == 13 && this.text_coil82.Text.Contains("R")) { this.label_color82.BackColor = Color.Green; } else { this.label_color82.BackColor = Color.Chocolate; } this.text_coil83.Text = dt.Rows[i]["COIL_ID83"].ToString(); if (this.text_coil83.Text != "" && this.text_coil83.Text.Length == 13 && this.text_coil83.Text.Contains("R")) { this.label_color83.BackColor = Color.Green; } else { this.label_color83.BackColor = Color.Chocolate; } this.text_coil84.Text = dt.Rows[i]["COIL_ID84"].ToString(); if (this.text_coil84.Text != "" && this.text_coil84.Text.Length == 13 && this.text_coil84.Text.Contains("R")) { this.label_color84.BackColor = Color.Green; } else { this.label_color84.BackColor = Color.Chocolate; } this.text_coil85.Text = dt.Rows[i]["COIL_ID85"].ToString(); if (this.text_coil85.Text != "" && this.text_coil85.Text.Length == 13 && this.text_coil85.Text.Contains("R")) { this.label_color85.BackColor = Color.Green; } else { this.label_color85.BackColor = Color.Chocolate; } this.text_coil86.Text = dt.Rows[i]["COIL_ID86"].ToString(); if (this.text_coil86.Text != "" && this.text_coil86.Text.Length == 13 && this.text_coil86.Text.Contains("R")) { this.label_color86.BackColor = Color.Green; } else { this.label_color86.BackColor = Color.Chocolate; } this.text_coil87.Text = dt.Rows[i]["COIL_ID87"].ToString(); if (this.text_coil87.Text != "" && this.text_coil87.Text.Length == 13 && this.text_coil87.Text.Contains("R")) { this.label_color87.BackColor = Color.Green; } else { this.label_color87.BackColor = Color.Chocolate; } this.text_coil88.Text = dt.Rows[i]["COIL_ID88"].ToString(); if (this.text_coil88.Text != "" && this.text_coil88.Text.Length == 13 && this.text_coil88.Text.Contains("R")) { this.label_color88.BackColor = Color.Green; } else { this.label_color88.BackColor = Color.Chocolate; } this.text_coil89.Text = dt.Rows[i]["COIL_ID89"].ToString(); if (this.text_coil89.Text != "" && this.text_coil89.Text.Length == 13 && this.text_coil89.Text.Contains("R")) { this.label_color89.BackColor = Color.Green; } else { this.label_color89.BackColor = Color.Chocolate; } this.text_coil90.Text = dt.Rows[i]["COIL_ID90"].ToString(); if (this.text_coil90.Text != "" && this.text_coil90.Text.Length == 13 && this.text_coil90.Text.Contains("R")) { this.label_color90.BackColor = Color.Green; } else { this.label_color90.BackColor = Color.Chocolate; } this.text_coil91.Text = dt.Rows[i]["COIL_ID91"].ToString(); if (this.text_coil91.Text != "" && this.text_coil91.Text.Length == 13 && this.text_coil91.Text.Contains("R")) { this.label_color91.BackColor = Color.Green; } else { this.label_color91.BackColor = Color.Chocolate; } this.text_coil92.Text = dt.Rows[i]["COIL_ID92"].ToString(); if (this.text_coil92.Text != "" && this.text_coil92.Text.Length == 13 && this.text_coil92.Text.Contains("R")) { this.label_color92.BackColor = Color.Green; } else { this.label_color92.BackColor = Color.Chocolate; } this.text_coil93.Text = dt.Rows[i]["COIL_ID93"].ToString(); if (this.text_coil93.Text != "" && this.text_coil93.Text.Length == 13 && this.text_coil93.Text.Contains("R")) { this.label_color93.BackColor = Color.Green; } else { this.label_color93.BackColor = Color.Chocolate; } this.text_coil94.Text = dt.Rows[i]["COIL_ID94"].ToString(); if (this.text_coil94.Text != "" && this.text_coil94.Text.Length == 13 && this.text_coil94.Text.Contains("R")) { this.label_color94.BackColor = Color.Green; } else { this.label_color94.BackColor = Color.Chocolate; } this.text_coil95.Text = dt.Rows[i]["COIL_ID95"].ToString(); if (this.text_coil95.Text != "" && this.text_coil95.Text.Length == 13 && this.text_coil95.Text.Contains("R")) { this.label_color95.BackColor = Color.Green; } else { this.label_color95.BackColor = Color.Chocolate; } this.text_coil96.Text = dt.Rows[i]["COIL_ID96"].ToString(); if (this.text_coil96.Text != "" && this.text_coil96.Text.Length == 13 && this.text_coil96.Text.Contains("R")) { this.label_color96.BackColor = Color.Green; } else { this.label_color96.BackColor = Color.Chocolate; } this.text_coil97.Text = dt.Rows[i]["COIL_ID97"].ToString(); if (this.text_coil97.Text != "" && this.text_coil97.Text.Length == 13 && this.text_coil97.Text.Contains("R")) { this.label_color97.BackColor = Color.Green; } else { this.label_color97.BackColor = Color.Chocolate; } this.text_coil98.Text = dt.Rows[i]["COIL_ID98"].ToString(); if (this.text_coil98.Text != "" && this.text_coil98.Text.Length == 13 && this.text_coil98.Text.Contains("R")) { this.label_color98.BackColor = Color.Green; } else { this.label_color98.BackColor = Color.Chocolate; } } return; } catch (Exception ex) { MessageBox.Show("系统更新,请重启系统!"); return; } } private void UIK050110_Load(object sender, EventArgs e) { this.label_color1.BackColor = Color.Chocolate; this.label_color2.BackColor = Color.Chocolate; this.label_color3.BackColor = Color.Chocolate; this.label_color4.BackColor = Color.Chocolate; this.label_color5.BackColor = Color.Chocolate; this.label_color6.BackColor = Color.Chocolate; this.label_color7.BackColor = Color.Chocolate; this.label_color8.BackColor = Color.Chocolate; this.label_color9.BackColor = Color.Chocolate; this.label_color10.BackColor = Color.Chocolate; this.label_color11.BackColor = Color.Chocolate; this.label_color12.BackColor = Color.Chocolate; this.label_color13.BackColor = Color.Chocolate; this.label_color14.BackColor = Color.Chocolate; this.label_color15.BackColor = Color.Chocolate; this.label_color16.BackColor = Color.Chocolate; this.label_color17.BackColor = Color.Chocolate; this.label_color18.BackColor = Color.Chocolate; this.label_color19.BackColor = Color.Chocolate; this.label_color20.BackColor = Color.Chocolate; this.label_color22.BackColor = Color.Chocolate; this.label_color23.BackColor = Color.Chocolate; this.label_color24.BackColor = Color.Chocolate; this.label_color25.BackColor = Color.Chocolate; this.label_color26.BackColor = Color.Chocolate; this.label_color27.BackColor = Color.Chocolate; this.label_color28.BackColor = Color.Chocolate; this.label_color29.BackColor = Color.Chocolate; this.label_color21.BackColor = Color.Chocolate; this.label_color30.BackColor = Color.Chocolate; this.label_color31.BackColor = Color.Chocolate; this.label_color32.BackColor = Color.Chocolate; this.label_color33.BackColor = Color.Chocolate; this.label_color34.BackColor = Color.Chocolate; this.label_color35.BackColor = Color.Chocolate; this.label_color36.BackColor = Color.Chocolate; this.label_color37.BackColor = Color.Chocolate; this.label_color38.BackColor = Color.Chocolate; this.label_color39.BackColor = Color.Chocolate; this.label_color41.BackColor = Color.Chocolate; this.label_color40.BackColor = Color.Chocolate; this.label_color42.BackColor = Color.Chocolate; this.label_color43.BackColor = Color.Chocolate; this.label_color44.BackColor = Color.Chocolate; this.label_color47.BackColor = Color.Chocolate; this.label_color45.BackColor = Color.Chocolate; this.label_color46.BackColor = Color.Chocolate; this.label_color48.BackColor = Color.Chocolate; this.label_color49.BackColor = Color.Chocolate; this.label_color50.BackColor = Color.Chocolate; this.label_color51.BackColor = Color.Chocolate; this.label_color52.BackColor = Color.Chocolate; this.label_color53.BackColor = Color.Chocolate; this.label_color54.BackColor = Color.Chocolate; this.label_color55.BackColor = Color.Chocolate; this.label_color56.BackColor = Color.Chocolate; this.label_color57.BackColor = Color.Chocolate; this.label_color58.BackColor = Color.Chocolate; this.label_color59.BackColor = Color.Chocolate; this.label_color60.BackColor = Color.Chocolate; this.label_color61.BackColor = Color.Chocolate; this.label_color62.BackColor = Color.Chocolate; this.label_color63.BackColor = Color.Chocolate; this.label_color64.BackColor = Color.Chocolate; this.label_color65.BackColor = Color.Chocolate; this.label_color66.BackColor = Color.Chocolate; this.label_color67.BackColor = Color.Chocolate; this.label_color68.BackColor = Color.Chocolate; this.label_color69.BackColor = Color.Chocolate; this.label_color70.BackColor = Color.Chocolate; this.label_color81.BackColor = Color.Chocolate; this.label_color82.BackColor = Color.Chocolate; this.label_color73.BackColor = Color.Chocolate; this.label_color74.BackColor = Color.Chocolate; this.label_color75.BackColor = Color.Chocolate; this.label_color76.BackColor = Color.Chocolate; this.label_color77.BackColor = Color.Chocolate; this.label_color78.BackColor = Color.Chocolate; this.label_color79.BackColor = Color.Chocolate; this.label_color83.BackColor = Color.Chocolate; this.label_color80.BackColor = Color.Chocolate; this.label_color84.BackColor = Color.Chocolate; this.label_color85.BackColor = Color.Chocolate; this.label_color86.BackColor = Color.Chocolate; this.label_color87.BackColor = Color.Chocolate; this.label_color88.BackColor = Color.Chocolate; this.label_color89.BackColor = Color.Chocolate; this.label_color90.BackColor = Color.Chocolate; this.label_color91.BackColor = Color.Chocolate; this.label_color92.BackColor = Color.Chocolate; this.label_color93.BackColor = Color.Chocolate; this.label_color94.BackColor = Color.Chocolate; this.label_color95.BackColor = Color.Chocolate; this.label_color96.BackColor = Color.Chocolate; this.label_color97.BackColor = Color.Chocolate; this.label_color98.BackColor = Color.Chocolate; } } }