| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- 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<FileBean> 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();
- }
- }
- }
- }
|