using Core.Mes.Client.Comm.Control; using Core.StlMes.Client.Judge.Commons; using CoreFS.CA06; using System; using System.Data; using System.Drawing; using System.Windows.Forms; namespace Core.StlMes.Client.Judge.Controls { public partial class QcmZcJudgeCtrl : UserControl { private Dal _d; public QcmZcJudgeCtrl(Control container, OpeBase ob) { InitializeComponent(); container.Controls.Add(this); this.Dock = DockStyle.Fill; this.BringToFront(); _d = new Dal(ob); } public void Query(string batchNo, string judgeStoveNo, string judgeResult, string timeBegin, string timeEnd, string[] plines) { DataTable dt = _d.GetTableByXmlId("JdgQcmZcJudge.Query", batchNo, judgeStoveNo, judgeResult, timeBegin, timeEnd, plines.Length, plines); GridHelper.CopyDataToDatatable(dt, dataTable1, true); GridHelper.RefreshAndAutoSize(entityGrid1); } public void ClearData() { dataTable1.Clear(); } private void entityGrid1_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e) { GridHelper.RefreshAndAutoSize(entityGrid1); } private void entityGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { Color red = Color.FromArgb(255, 106, 106); if (e.Row.GetValue("chemResultCode") == "40740102") { e.Row.Cells["chemResult"].Appearance.BackColor = red; } if (e.Row.GetValue("phyResultCode") == "40740202") { e.Row.Cells["phyResult"].Appearance.BackColor = red; } if (e.Row.GetValue("judgeResultCode") == "40740704") { e.Row.Cells["judgeResult"].Appearance.BackColor = red; } } private void entityGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { } } }