using CoreFS.CA06; using Infragistics.Win.UltraWinEditors; using Infragistics.Win.UltraWinGrid; namespace Core.StlMes.Client.Qcm { public partial class MscStandPayN : FrmBase { public MscStandPayN(string strIc, string standPayKey, OpeBase ob) { InitializeComponent(); ComStandPay standPay = new ComStandPay("2", ob); standPay.CkbDeleteFilter = this.checkBox1; standPay.TabChemStand = this.panel1; standPay.TabComMSCStdDetection = this.panel1; standPay.TabMaterialStand = this.panel1; standPay.TabProductWater = this.panel1; standPay.TabTolerancesStand = this.panel1; standPay.TabComMSCStdProcess = this.panel1; string[] strAry = new string[2]; strAry[0] = "ultraGrid1"; switch (standPayKey) { case "ChemStand": strAry[1] = "ultraCheckValid"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryChemStandWithOutFilter(); standPay.ExpandChemStandGrid(); break; case "ComMSCStdDetection": strAry[1] = "ultraCheckValid"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryComMSCStdDetectionWithOutFilter(); standPay.ExpandComMSCStdDetectionGrid(); break; case "MaterialStand": strAry[1] = "ultraCheckEditor2"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryMaterialStandWithOutFilter(); standPay.ExpandMaterialStandGrid(); break; case "ProductWater": strAry[1] = "ultraCheckValid"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryProductWaterWithOutFilter(); standPay.ExpandProductWaterGrid(); break; case "TolerancesStand": strAry[1] = "chkValid"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryTolerancesStandWithOutFilter(); standPay.ExpandTolerancesStandGrid(); break; case "ComMSCStdProcess": strAry[1] = "ultraCheckValid"; standPay.SaveStandPay("2", standPayKey, strAry); standPay.LoadStandPay("2", standPayKey); standPay.SetIcContidition(strIc, standPayKey); standPay.QueryComMSCStdProcessWithOutFilter(); standPay.ExpandComMSCStdProcess(); break; } SetGrid(); } private void SetGrid() { System.Windows.Forms.Control[] controls = panel1.Controls.Find("ultraGrid1", true); foreach (System.Windows.Forms.Control control in controls) { if (control is UltraGrid) { UltraGrid grid = (UltraGrid)control; foreach (UltraGridBand band in grid.DisplayLayout.Bands) { band.Override.AllowAddNew = AllowAddNew.No; foreach (UltraGridColumn column in band.Columns) { if (column.Key == "CHC") { column.Hidden = true; } else { if (column.EditorComponent is UltraComboEditor) { column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown; } column.CellActivation = Activation.ActivateOnly; } } } } } } } }