private void GetDate() { foreach (var item in ass.GetFJOpcServerItem()) { updateListBox(item.AREANAME + "第一组:" + item.ERRORMSG, listBox1); } foreach (var item in ass.GetFJOpcServerItem()) { updateListBox(item.AREANAME + "第二组:" + item.ERRORMSG, listBox1); } foreach (var item in ass.GetFJOpcServerItem()) { updateListBox(item.AREANAME + "第三组:" + item.ERRORMSG, listBox1); } foreach (var item in ass.GetFJOpcServerItem()) { updateListBox(item.AREANAME + "第四组:" + item.ERRORMSG, listBox1); } }
private void GetListBoxItems2() { updateListBox(System.DateTime.Now.ToString() + "开始自检", listBox2); updateListBox("自检中,请等待......", listBox2); AllSystemStart ass2 = new AllSystemStart(); List <Abnormallists> li = ass2.GetFJOpcServerItem(); str2 = ass2.ReadDBinfo(2); int i = 0; foreach (var item in str2) { if (item != "0") { updateListBox(li[i].ERRORMSG, listBox2); } i++; } updateListBox("本次自检结束......", listBox2); str2.Clear(); }