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 DetectFileCtrl : UserControl { private Dal _d; private OpeBase ob; public DetectFileCtrl(Control container, OpeBase ob, bool showProcess) { InitializeComponent(); this.ob = ob; container.Controls.Add(this); this.Dock = DockStyle.Fill; this.BringToFront(); _d = new Dal(ob); if (!showProcess) { ultraGrid1.DisplayLayout.Bands[0].Columns["processDesc"].Hidden = true; ultraGrid1.DisplayLayout.Bands[0].Columns["detectFile2"].Hidden = true; } } public void Query(string judgeStoveNo) { DataTable dt = _d.GetTableByXmlId("QcmGpJugdeApplyDAL.getDetectFile", judgeStoveNo); GridHelper.CopyDataToDatatable(dt, dataTable1, true); } public void QueryBatchNo(string judgeApplyCode, string judgeStoveNo, string batchNo) { DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getDetectFile", judgeApplyCode, judgeStoveNo, batchNo); GridHelper.CopyDataToDatatable(dt, dataTable1, true); } public void QueryBatchNoZc(string judgeStoveNo, string batchNo) { DataTable dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getDetectFileZc", judgeStoveNo, batchNo); GridHelper.CopyDataToDatatable(dt, dataTable1, true); } private void DealWithDetectFile(DataTable dt) { DataTable dtNew = dt.Clone(); //foreach (DataRow dr in dt) //{ // List fileBeans = dr["detectResultPath"].ToString(); //} } public void ClearData() { dataTable1.Clear(); } private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e) { if (ultraGrid1.ActiveCell.Column.Key == "detectFile") { string filePath = ultraGrid1.ActiveRow.GetValue("detectResultPath"); FormFileDown formFile = new FormFileDown(this.ob, filePath); formFile.DeleteButton.Visible = false; formFile.Show(); } else { string filePath = ultraGrid1.ActiveRow.GetValue("detectResultPath2"); FormFileDown formFile = new FormFileDown(this.ob, filePath); formFile.DeleteButton.Visible = false; formFile.Show(); } } } }