using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Core.Mes.Client.Comm.Tool; using Core.Mes.Client.Comm.Control; using System.Collections; namespace Core.StlMes.Client.Lims.Data.PipeAndOutdec { public partial class FrmLabSampleState : FrmBase { private string[] arrId;//数据权限 private string[] plineCodes = { }; public FrmLabSampleState() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); //publicUltraGridDetail1.Ug.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;//不显示行头 //publicUltraGridDetail1.Ug.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False; //publicUltraGridChemDetail1.Ug.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False; } private void FrmLabSampleState_Load(object sender, EventArgs e) { arrId = this.ValidDataPurviewIds;//获取数据权限 plineCodes = comm.GetPlineCode(ValidDataPurviewIds, ob); pipeQueryBase1.ShowControlSampleNo(); InitColumns(); } private void InitColumns() { string[] arrColumnsDetail = new string[] { "FLAG_DESC", "CHECK_NO", "SAMPLE_NO", "CRAFT_SOURCE", "HEAD_MAT_NO", "HEAT_NO", "PHY_CODE_MAX", "PHY_NAME_MAX", "SAMPLE_COUNT", "CONTRACT_NO", "STEEL_GRADE", "PIPE_SIZE", "ISPRODUCER_DESC", "CRAFT_PATH", "JG_SEND_NAME", "JG_SEND_TIME", "LAB_RECEIVE_NAME", "LAB_RECEIVE_TIME", "CHECK_NAME", "CHECK_TIME", "AUDIT_NAME", "AUDIT_TIME", "TEST_DATE" }; string[] arrCaptionDetail = new string[] { "检验项状态", "检验编号", "试样号", "委托类型", "管头编号", "炉号", "检验项代码", "检验项", "试样数", "合同号", "钢级", "规格", "是否监制", "工艺文件路径", "送样人", "送样时间", "收样人", "收样时间", "试验人", "试验时间", "审核人", "审核时间", "腐蚀试验日期" }; publicUltraGridDetail1.InitColumns(arrColumnsDetail, arrCaptionDetail); publicUltraGridDetail1.setColumnShowOrHidden(new string[] { "PHY_CODE_MAX" }, false); publicUltraGridDetail1.setOtherColumnReadOnly(null); } /// /// 重写基类方法 /// /// /// public override void ToolBar_Click(object sender, string ToolbarKey) { //新增、修改修约值、审核、删除、退出 switch (ToolbarKey) { case "Query": QueryCheckConsignDetailInfo("0123459"); break; case "Export": ExportData(); break; case "Close": if (MessageUtil.ShowYesNoAndQuestion("是否确认关闭页面?") == DialogResult.Yes) { this.Close(); } break; } } /// /// 导出 /// private void ExportData() { GridHelper.ulGridToExcel(publicUltraGridDetail1.Ug, "管材试验室试样状态跟踪数据"); } //查询检验委托基本信息 private void QueryCheckConsignDetailInfo(string strFlag) { try { ArrayList arrayList = pipeQueryBase1.GetQueryInfo(strFlag); publicUltraGridDetail1.QueryCheckConsignBaseDetailSampleNo("pipe.PublicPipeBase", arrayList, this.ob, arrId, plineCodes,this.CustomInfo.ToString()); } catch (Exception e) { MessageUtil.ShowWarning(e.Message); } } } }