using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Tool; 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 FaceInfoCtrl : UserControl { private Dal _d; private string _processCode = ""; public FaceInfoCtrl(Control container, OpeBase ob, string processCode) { InitializeComponent(); _d = new Dal(ob); _processCode = processCode; container.Controls.Add(this); this.Dock = DockStyle.Fill; } public void Query(string judgeStoveNo, string batchNo, string zpMLh) { CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.getFaceInfo", judgeStoveNo, batchNo, _processCode, zpMLh); if (ccp.ReturnInfo.ToString2() != "") { MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2()); return; } DataTable dt = JsonHelper.toTable(ccp.ReturnObject.ToString2()); if (dt == null || dt.Rows.Count == 0) return; GridHelper.CopyDataToDatatable(dt, dataTable1, true); foreach (DataRow row in dataTable1.Rows) { if (row["judgeStoveNo"].ToString() != "") continue; row["judgeStoveNo"] = judgeStoveNo; row["batchNo"] = batchNo; } GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "reportPath"); } public void Query(string judgeStoveNo, string batchNo, string zpMLh,string plineCode) { CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.getFaceInfoByPline", judgeStoveNo, batchNo, _processCode, zpMLh, plineCode); if (ccp.ReturnInfo.ToString2() != "") { MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2()); return; } DataTable dt = JsonHelper.toTable(ccp.ReturnObject.ToString2()); if (dt.Rows.Count == 0) return; GridHelper.CopyDataToDatatable(dt, dataTable1, true); foreach (DataRow row in dataTable1.Rows) { if (row["judgeStoveNo"].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(); } } }