using Core.Mes.Client.Comm.Control; using Core.StlMes.Client.Judge.Commons; using CoreFS.CA06; using CoreFS.SA06; using Infragistics.Win.UltraWinGrid; using System; using System.Data; using System.Drawing; using System.Windows.Forms; namespace Core.StlMes.Client.Judge.Controls { public partial class QcmBcPassApplyCtrl : UserControl { private Dal _d; private OpeBase ob; private string _unitCode; public QcmBcPassApplyCtrl(Control container, OpeBase ob, string unitCode) { InitializeComponent(); _d = new Dal(ob); this.ob = ob; _unitCode = unitCode; container.Controls.Add(this); this.Dock = DockStyle.Fill; this.BringToFront(); } public void AuditeQuery(string judgeStoveNo, string batchNo, string timeB, string timeE, string passType, string auditState, string validflag, string processCode, string orderNo, string orderSeq) { DataTable dt; dt = _d.GetTableByXmlId("QcmBcPassApplyDAL.auditeQuery", judgeStoveNo, batchNo, timeB, timeE, auditState, passType, validflag, CoreUserInfo.UserInfo.GetUserName(), _unitCode, processCode, orderNo, orderSeq); GridHelper.CopyDataToDatatable(dt, dataTable1, true); GridHelper.RefreshAndAutoSize(ultraGrid1); } public void AllQuery(string judgeStoveNo, string batchNo, string timeB, string timeE, string passType, string validflag, string processCode) { DataTable dt = _d.GetTableByXmlId("QcmBcPassApplyDAL.allQuery", judgeStoveNo, batchNo, timeB, timeE, passType, validflag, processCode); GridHelper.CopyDataToDatatable(dt, dataTable1, true); GridHelper.RefreshAndAutoSize(ultraGrid1); } private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { e.Cell.Row.Update(); } private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { Color yellow = Color.FromArgb(238, 238, 0); Color red = Color.FromArgb(255, 106, 106); Color green = Color.FromArgb(60, 179, 113); if (e.Row.GetValue("validflag") == "0") { e.Row.RowSelectorAppearance.BackColor = Color.Red; } if (e.Row.GetValue("auditResult") == "审核通过") { e.Row.RowSelectorAppearance.BackColor = green; } else if (e.Row.GetValue("auditResult") == "审核通过") { e.Row.RowSelectorAppearance.BackColor = yellow; } else if (e.Row.GetValue("auditResult") == "审核不通过") { e.Row.RowSelectorAppearance.BackColor = red; } } FormFileDown askDown; private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { string filePath = ultraGrid1.ActiveRow.GetValue("craftPath"); askDown = new FormFileDown(ob, filePath); askDown.DeleteButton.Visible = false; askDown.Show(); } private void ultraGrid1_MouseUp(object sender, MouseEventArgs e) { foreach (UltraGridRow row in ultraGrid1.Rows) { if (row.Selected) { row.Cells["CHK"].Value = true; } } ultraGrid1.UpdateData(); } } }