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 ChamferingInfoCtrl : UserControl { private Dal _d; public ChamferingInfoCtrl(Control container, OpeBase ob) { InitializeComponent(); container.Controls.Add(this); this.Dock = DockStyle.Fill; _d = new Dal(ob); } public void Query(string judgeStoveNo, string batchNo, bool clearData) { DataTable dt = _d.GetTableByXmlId("JdgMchChamferingResult.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.RefreshAndAutoSizeExceptColumns(ultraGrid1, "reportPath"); } public void Query(string judgeStoveNo, string batchNo, bool clearData,string plineCode) { DataTable dt = _d.GetTableByXmlId("JdgMchChamferingResult.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.RefreshAndAutoSizeExceptColumns(ultraGrid1, "reportPath"); } public void ClearData() { this.dataTable1.Clear(); } 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(); } } }