using Core.Mes.Client.Comm.Control; using Core.StlMes.Client.Judge.Commons; using CoreFS.CA06; using System; using System.Data; using System.Windows.Forms; namespace Core.StlMes.Client.Judge.Controls { public partial class PathInfoCtrl : UserControl { private Dal _d; public PathInfoCtrl(Control container, OpeBase ob) { InitializeComponent(); container.Controls.Add(this); this.Dock = DockStyle.Fill; _d = new Dal(ob); } public void Query(string processCode, string judgeStoveNo, string batchNo, bool clearData) { DataTable dt = _d.GetTableByXmlId("JdgMchPathResult.getInfo", judgeStoveNo, batchNo); GridHelper.CopyDataToDatatable(dt, dataTable1, clearData); foreach (DataRow row in dataTable1.Rows) { if (row["batchNo"].ToString() != "") continue; row["judgeStoveNo"] = judgeStoveNo; row["batchNo"] = batchNo; } GridHelper.RefreshAndAutoSize(ultraGrid1); } public void Query(string processCode, string judgeStoveNo, string batchNo, bool clearData, string plineCode) { DataTable dt = _d.GetTableByXmlId("JdgMchPathResult.getInfoByPline", judgeStoveNo, batchNo, plineCode); GridHelper.CopyDataToDatatable(dt, dataTable1, clearData); foreach (DataRow row in dataTable1.Rows) { if (row["batchNo"].ToString() != "") continue; row["judgeStoveNo"] = judgeStoveNo; row["batchNo"] = batchNo; } GridHelper.RefreshAndAutoSize(ultraGrid1); } private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { string filePath = ultraGrid1.ActiveRow.GetValue("reportPath"); FormFileDown formFile = new FormFileDown(_d.Ob, filePath); formFile.DeleteButton.Visible = false; formFile.Show(); } public void ClearData() { this.dataTable1.Clear(); } } }