using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Server; using Core.StlMes.Client.Judge.Commons; using Core.StlMes.Client.Judge.Forms; using CoreFS.CA06; using System.Data; using System.Windows.Forms; namespace Core.StlMes.Client.Judge.Controls { public partial class QcmZgChemJudgeApplyCtrl : UserControl { private OpeBase _ob; private JudgeType _judgeType; private Dal _d; public QcmZgChemJudgeApplyCtrl(Control container, OpeBase ob, JudgeType judgeType) { InitializeComponent(); this._ob = ob; _judgeType = judgeType; container.Controls.Add(this); this.Dock = DockStyle.Fill; this.BringToFront(); _d = new Dal(ob); ClsBaseInfo.FillComBaseInfo(ultraComboEditor1, "407401", ob, false); //判定结果只显示内控合格和不合格。 40740101内控合格 40740102内控不合格 DataTable dt = (DataTable)ultraComboEditor1.DataSource; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["BASECODE"].ToString() != "40740101" && dt.Rows[i]["BASECODE"].ToString() != "40740102") { dt.Rows[i].Delete(); } } dt.AcceptChanges(); ClsBaseInfo.SetComboItemHeight(ultraComboEditor1); ClsBaseInfo.FillComBaseInfo(ultraComboEditor2, "407402", ob, false); ClsBaseInfo.FillComBaseInfo(ultraComboEditor3, "407407", ob, false); ClsBaseInfo.FillComBaseInfo(ultraComboEditor4, "407404", ob, false); ClsBaseInfo.FillComBaseInfo(ultraComboEditor5, "407406", ob, false); } public void QueryBcChem(string batchNo, string judgeStoveNo, string state, string judgeTimeB, string judgeTimeE, string[] plines, string chemType, string gpSource, string processCode) { DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.QueryBcChem", batchNo, judgeStoveNo, state, judgeTimeB, judgeTimeE, plines.Length, plines, chemType, gpSource, processCode); GridHelper.CopyDataToDatatable(dt, dataTable1, true); GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "memo"); } public void Clear() { dataTable1.Clear(); } private void ultraTextEditor2_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { PopupTextBox popupText = new PopupTextBox(ultraGrid1.ActiveCell.Value.ToString(), 2000); if (popupText.ShowDialog() == System.Windows.Forms.DialogResult.OK) { ultraGrid1.ActiveCell.Value = popupText.TextInfo.Trim(); ultraGrid1.ActiveRow.Update(); } } private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { e.Cell.Row.Update(); } } }