using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.Judge.Commons; using CoreFS.CA06; using System; using System.Collections.Generic; using System.Data; using System.Windows.Forms; namespace Core.StlMes.Client.Judge.Controls { public partial class QcmZbsDetectResultCtrl : UserControl { private Dal _d; public QcmZbsDetectResultCtrl(Control container, OpeBase ob) { InitializeComponent(); _d = new Dal(ob); this.Dock = DockStyle.Fill; container.Controls.Add(this); LoadBaseData(); } private void LoadBaseData() { //加载基础数据 ClsBaseInfo.FillComBaseInfo(ultraComboEditor1, "4021", _d.Ob, false); ultraComboEditor1.DropDownListWidth = -1; JudgeBaseInfo.LoadPhyDetect(ultraComboEditor2, _d.Ob, false); ultraComboEditor2.DropDownListWidth = -1; } public void Query(string zbsId) { DataTable dt = _d.GetTableByXmlId("JdgQcmZbsDetectResult.getByZbsId", zbsId); GridHelper.CopyDataToDatatable(dt, dataTable1, true); GridHelper.RefreshAndAutoSize(ultraGrid1); } public void Modify() { List jsons = new List(); foreach (DataRow dr in dataTable1.Rows) { if (dr["chk"].ToString() == "False") continue; jsons.Add(JsonHelper.ToJson(dr)); } if (MessageUtil.ShowYesNoAndQuestion("是否确认修改?") == DialogResult.No) { return; } var ccp = _d.Set("com.steering.pss.judge.Bll.BllCreateZbsInfo.modifyZbsDetect", jsons); if (ccp.ReturnInfo.ToString2() != "") { MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2()); } else { MessageUtil.ShowTips("修改成功!"); } } public void ClearData() { dataTable1.Clear(); } private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { e.Cell.Row.Update(); if (e.Cell.Column.Key == "phyCode") { e.Cell.Row.Cells["phyName"].Value = e.Cell.Text; } } } }