private void InitialSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumns)); shtView.OperationMode = OperationMode.Normal; shtView.Columns[(int)eColumns.CHECK_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtView.Columns[(int)eColumns.CHECK_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; CtrlUtil.SpreadSetColumnsLocked(shtView, false, (int)eColumns.CHECK_FLAG); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.LAST_RECEIVE_DATE); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.PACK_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.FG_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.LOT_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.EXTERNAL_LOT_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.ONHAND_QTY); fpView.ContextMenuStrip = null; fpView.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; m_keyboardSpread = new KeyboardSpread(fpView); shtView.Columns[(int)eColView.CHECKBOX].CellType = CtrlUtil.CreateCheckboxCellType(); shtView.Columns[(int)eColView.CHECKBOX].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; m_keyboardSpread.RowAdding += new KeyboardSpread.RowAddingHandler(m_keyboardSpread_RowAdding); m_keyboardSpread.RowAdded += new KeyboardSpread.RowAddedHandler(m_keyboardSpread_RowAdded); m_keyboardSpread.RowRemoving += new KeyboardSpread.RowRemovingHandler(m_keyboardSpread_RowRemoving); fpView.ContextMenuStrip = null; fpView.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; LookupDataBIZ biz = new LookupDataBIZ(); FormatUtil.SetNumberFormat(shtView.Columns[(int)eColView.ONHAND_QTY], FormatUtil.eNumberFormat.Qty_PCS); //shtView.Columns[(int)eColView.INV_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(biz.LoadLookupClassType(DataDefine.UM_CLS.ToNZString())); CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); }
private void LoadLookupCellType() { LookupDataBIZ bizLookup = new LookupDataBIZ(); //Kind of Item LookupData lookupKind = bizLookup.LoadLookupClassType(DataDefine.KIND_OF_PRODUCT.ToNZString()); ReadOnlyPairCellType cellmachineType = new ReadOnlyPairCellType(lookupKind.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.KIND_OF_PRODUCT].CellType = cellmachineType; //ReadOnlyPairCellType cellmatType = new ReadOnlyPairCellType(lookupKind.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //shtItemView.Columns[(int)eColView.KIND_OF_MAT].CellType = cellmatType; //BOI LookupData lookupBOI = bizLookup.LoadLookupClassType(DataDefine.BOI_PROJECT.ToNZString()); ReadOnlyPairCellType cellBOI = new ReadOnlyPairCellType(lookupBOI, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.BOI].CellType = cellBOI; //Customer NZString[] CustomerType = new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer), (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor) }; LookupData LookupCustomer = bizLookup.LoadLookupLocation(CustomerType); ReadOnlyPairCellType cellCust = new ReadOnlyPairCellType(LookupCustomer, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.CUSTOMER_CD].CellType = cellCust; // Production DI LookupData LookupProductionDI = bizLookup.LoadLookupClassType(DataDefine.PRODUCTION_DI.ToNZString()); ReadOnlyPairCellType cellProductionDI = new ReadOnlyPairCellType(LookupProductionDI, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PRODUCTION_DI].CellType = cellProductionDI; // Matchine Supplier NZString[] MatSupplier = new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor), (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor) }; LookupData LookupMatSupplier = bizLookup.LoadLookupLocation(MatSupplier); ReadOnlyPairCellType cellMatSupplier = new ReadOnlyPairCellType(LookupMatSupplier.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MAT_SUPPLIER_CD].CellType = cellMatSupplier; ReadOnlyPairCellType cellPlatingSupplier = new ReadOnlyPairCellType(LookupMatSupplier.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PLATING_SUPPLIER_CD].CellType = cellPlatingSupplier; // Matchine DI LookupData LookupMatDI = bizLookup.LoadLookupClassType(DataDefine.MAT_DI.ToNZString()); ReadOnlyPairCellType cellMatDI = new ReadOnlyPairCellType(LookupMatDI, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MAT_DI].CellType = cellMatDI; // Item Level LookupData LookupItemLevel = bizLookup.LoadLookupClassType(DataDefine.ITEM_LEVEL.ToNZString()); ReadOnlyPairCellType cellItemLevel = new ReadOnlyPairCellType(LookupItemLevel, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.ITEM_LEVEL].CellType = cellItemLevel; // Screw Kind LookupData LookupScrewKind = bizLookup.LoadLookupClassType(DataDefine.SCREW_KIND.ToNZString()); ReadOnlyPairCellType cellScrewKind = new ReadOnlyPairCellType(LookupScrewKind, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.SCREW_KIND].CellType = cellScrewKind; // Screw Head LookupData LookupScrewHead = bizLookup.LoadLookupClassType(DataDefine.SCREW_HEAD.ToNZString()); ReadOnlyPairCellType cellScrewHead = new ReadOnlyPairCellType(LookupScrewHead, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.SCREW_HEAD].CellType = cellScrewHead; // Screw Type LookupData LookupScrewType = bizLookup.LoadLookupClassType(DataDefine.SCREW_TYPE.ToNZString()); ReadOnlyPairCellType cellScrewType = new ReadOnlyPairCellType(LookupScrewType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.SCREW_TYPE].CellType = cellScrewType; // Screw Remark1 LookupData LookupScrewRemark1 = bizLookup.LoadLookupClassType(DataDefine.SCREW_REMARK1.ToNZString()); ReadOnlyPairCellType cellScrewRemark1 = new ReadOnlyPairCellType(LookupScrewRemark1, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.SCREW_REMARK1].CellType = cellScrewRemark1; // Screw Remark2 LookupData LookupScrewRemark2 = bizLookup.LoadLookupClassType(DataDefine.SCREW_REMARK2.ToNZString()); ReadOnlyPairCellType cellScrewRemark2 = new ReadOnlyPairCellType(LookupScrewRemark2, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.SCREW_REMARK2].CellType = cellScrewRemark2; // Machine Type1 LookupData LookupMCType = bizLookup.LoadLookupClassType(DataDefine.MACHINE_TYPE.ToNZString()); ReadOnlyPairCellType cellMCType1 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE1].CellType = cellMCType1; // Machine Type2 ReadOnlyPairCellType cellMCType2 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE2].CellType = cellMCType2; // Machine Type3 ReadOnlyPairCellType cellMCType3 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE3].CellType = cellMCType3; // Machine Type4 ReadOnlyPairCellType cellMCType4 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE4].CellType = cellMCType4; // Machine Type5 ReadOnlyPairCellType cellMCType5 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE5].CellType = cellMCType5; // Machine Type6 ReadOnlyPairCellType cellMCType6 = new ReadOnlyPairCellType(LookupMCType.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.MACHINE_TYPE6].CellType = cellMCType6; // Process1 NZString[] Production = new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Production) }; LookupData LookupProduction = bizLookup.LoadLookupLocation(Production); ReadOnlyPairCellType cellProduction1 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS1].CellType = cellProduction1; //Process2 ReadOnlyPairCellType cellProduction2 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS2].CellType = cellProduction2; //Process3 ReadOnlyPairCellType cellProduction3 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS3].CellType = cellProduction3; //Process4 ReadOnlyPairCellType cellProduction4 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS4].CellType = cellProduction4; //Process5 ReadOnlyPairCellType cellProduction5 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS5].CellType = cellProduction5; //Process6 ReadOnlyPairCellType cellProduction6 = new ReadOnlyPairCellType(LookupProduction.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PROCESS6].CellType = cellProduction6; // HeatTreatmentType LookupData LookupHeatTreatmentType = bizLookup.LoadLookupClassType(DataDefine.HEAT_TREATMENT_TYPE.ToNZString()); ReadOnlyPairCellType cellTreatmentType = new ReadOnlyPairCellType(LookupHeatTreatmentType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.HEAT_TYPE].CellType = cellTreatmentType; // KTC Plating LookupData LookupKTCPlating = bizLookup.LoadLookupClassType(DataDefine.KTC_PLATING.ToNZString()); ReadOnlyPairCellType cellKTCPlating = new ReadOnlyPairCellType(LookupKTCPlating, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.PLATING_KTC].CellType = cellKTCPlating; // Baking Time LookupData LookupBakTime = bizLookup.LoadLookupClassType(DataDefine.BAKING_TIME.ToNZString()); ReadOnlyPairCellType cellBakTime = new ReadOnlyPairCellType(LookupBakTime, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.BAKING_TIME].CellType = cellBakTime; // Baking Temp LookupData LookupBakTemp = bizLookup.LoadLookupClassType(DataDefine.BAKING_TEMP.ToNZString()); ReadOnlyPairCellType cellBakTemp = new ReadOnlyPairCellType(LookupBakTemp, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.BAKING_TEMP].CellType = cellBakTemp; // Other Kind LookupData LookupOtherKind = bizLookup.LoadLookupClassType(DataDefine.OTHER_KIND.ToNZString()); ReadOnlyPairCellType cellOtherKind1 = new ReadOnlyPairCellType(LookupOtherKind.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_KIND].CellType = cellOtherKind1; ReadOnlyPairCellType cellOtherKind2 = new ReadOnlyPairCellType(LookupOtherKind.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_KIND].CellType = cellOtherKind2; // Other Condition LookupData LookupOtherCon = bizLookup.LoadLookupClassType(DataDefine.OTHER_CONDITION.ToNZString()); ReadOnlyPairCellType cellOtherCon1 = new ReadOnlyPairCellType(LookupOtherCon.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_CONDITION].CellType = cellOtherCon1; ReadOnlyPairCellType cellOtherCon2 = new ReadOnlyPairCellType(LookupOtherCon.Clone(), CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_CONDITION].CellType = cellOtherCon2; //shtItemView.Columns[(int)eColView.CRT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); //shtItemView.Columns[(int)eColView.UPD_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); shtItemView.Columns[(int)eColView.HEAT_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtItemView.Columns[(int)eColView.HEAT_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtItemView.Columns[(int)eColView.PLATING_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtItemView.Columns[(int)eColView.PLATING_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtItemView.Columns[(int)eColView.BAKING_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtItemView.Columns[(int)eColView.BAKING_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; FormatUtil.SetNumberFormat(shtItemView.Columns[(int)eColView.WEIGHT], FormatUtil.eNumberFormat.Qty_Gram); FormatUtil.SetNumberFormat(shtItemView.Columns[(int)eColView.ITEM_CD], FormatUtil.eNumberFormat.MasterNo); FormatUtil.SetDateTimeFormat(shtItemView.Columns[(int)eColView.CRT_DATE]); FormatUtil.SetDateTimeFormat(shtItemView.Columns[(int)eColView.UPD_DATE]); //// Lookup Item Type //LookupData lookupItemType = bizLookup.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString()); //// Lookup Lot Control //LookupData lookupLotControl = bizLookup.LoadLookupClassType(DataDefine.LOT_CONTROL_CLS.ToNZString()); //// Lookup Lot Customer //LookupData lookupCustomer = bizLookup.LoadLookupLocation();// bizLookup.LoadLookupClassType(DataDefine.LOCATION_CLS.ToNZString()); //// Lookup OrderLoc //LookupData lookupOrderLoc = bizLookup.LoadLookupLocation(); //// Lookup ORDER_PROCESS_CLS //LookupData lookupOrderProcess = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.ORDER_PROCESS_CLS)); //// Lookup StoreLoc //LookupData lookupStoreLoc = bizLookup.LoadLookupLocation(); //// Lookup CustoemrLoc //LookupData lookupCustoemrLoc = bizLookup.LoadLookupLocation(); //// Lookup Consumption //LookupData lookupConsumption = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.CONSUMPTION_CLS)); //// Lookup InventUM //LookupData lookupInventUM = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.UM_CLS)); //// Lookup OrderUM //LookupData lookupOrderUM = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.UM_CLS)); //ReadOnlyPairCellType ItemTypecellType = new ReadOnlyPairCellType(lookupItemType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType LotControlcellType = new ReadOnlyPairCellType(lookupLotControl, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType CustomercellType = new ReadOnlyPairCellType(lookupCustomer, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType OrderProcess = new ReadOnlyPairCellType(lookupOrderProcess, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType OrderLoc = new ReadOnlyPairCellType(lookupOrderLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType StoreLoc = new ReadOnlyPairCellType(lookupStoreLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType CustoemrLoc = new ReadOnlyPairCellType(lookupCustoemrLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType Consumption = new ReadOnlyPairCellType(lookupConsumption, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType InventUM = new ReadOnlyPairCellType(lookupInventUM, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //ReadOnlyPairCellType OrderUM = new ReadOnlyPairCellType(lookupOrderUM, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL); //shtItemView.Columns[(int)eColView.ORDER_UM_CLS1].CellType = OrderUM; //shtItemView.Columns[(int)eColView.INV_UM_CLS1].CellType = InventUM; //shtItemView.Columns[(int)eColView.STORE_LOC_CD1].CellType = StoreLoc; //shtItemView.Columns[(int)eColView.ORDER_LOC_CD1].CellType = OrderLoc; //shtItemView.Columns[(int)eColView.ORDER_PROCESS_CLS1].CellType = OrderProcess; //shtItemView.Columns[(int)eColView.FOR_CUSTOMER1].CellType = CustomercellType; //shtItemView.Columns[(int)eColView.LOT_CONTROL_CLS1].CellType = LotControlcellType; //shtItemView.Columns[(int)eColView.ITEM_CLS].CellType = ItemTypecellType; //shtItemView.Columns[(int)eColView.ITEM_CLS_MINOR1].CellType = CtrlUtil.CreateReadOnlyPairCellType(bizLookup.LoadLookupClassType((NZString)DataDefine.ITEM_CLS_MINOR04)); //shtItemView.Columns[(int)eColView.CONSUMTION_CLS1].CellType = Consumption; }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; LookupDataBIZ biz = new LookupDataBIZ(); LookupData locationLookupData = biz.LoadLookupLocation(); shtView.Columns[(int)eColView.ORDER_LOC_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData); LookupData umClassLookupData = biz.LoadLookupClassType(DataDefine.UM_CLS.ToNZString()); shtView.Columns[(int)eColView.ORDER_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(umClassLookupData); shtView.Columns[(int)eColView.INV_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(umClassLookupData); LookupData itemClassLookupData = biz.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString()); shtView.Columns[(int)eColView.ITEM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(itemClassLookupData); LookupData ordClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordClassLookupData); LookupData ordcClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_CONDITION.ToNZString()); shtView.Columns[(int)eColView.ORDER_CONDITION].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordcClassLookupData); LookupData ordpClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordpClassLookupData); LookupData mrpClassLookupData = biz.LoadLookupClassType(DataDefine.MRP_FLAG.ToNZString()); shtView.Columns[(int)eColView.MRP_FLAG].CellType = CtrlUtil.CreateReadOnlyPairCellType(mrpClassLookupData); shtView.Columns[(int)eColView.CRT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.CRT_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.UPD_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.UPD_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.AT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.AT_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.IS_ACTIVE].CellType = CtrlUtil.CreateCheckboxCellType("", ""); shtView.Columns[(int)eColView.CRT_BY].Visible = false; shtView.Columns[(int)eColView.CRT_DATE].Visible = false; shtView.Columns[(int)eColView.CRT_MACHINE].Visible = false; shtView.Columns[(int)eColView.UPD_BY].Visible = false; shtView.Columns[(int)eColView.UPD_DATE].Visible = false; shtView.Columns[(int)eColView.UPD_MACHINE].Visible = false; shtView.Columns[(int)eColView.IS_ACTIVE].Visible = false; shtView.Columns[(int)eColView.BAL_QTY].Visible = false; shtView.Columns[(int)eColView.ITEM_CLS].Visible = false; shtView.Columns[(int)eColView.MAX_CAPACITY].Visible = false; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); for (int i = 0; i < shtView.ColumnCount; i++) { shtView.Columns[i].AllowAutoFilter = true; shtView.Columns[i].AllowAutoSort = true; } }
private void InitializeSpread() { shtProductionReportList.ActiveSkin = Common.ACTIVE_SKIN; #region Cell Type LookupDataBIZ m_bizLookupData = new LookupDataBIZ(); LookupData dataShiftCls = m_bizLookupData.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString()); shtProductionReportList.Columns[(int)eColView.SHIFT].CellType = CtrlUtil.CreateReadOnlyPairCellType(dataShiftCls); NZString[] locationtype = new NZString[1]; locationtype[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Production).ToNZString(); LookupData dataProductionProcess = m_bizLookupData.LoadLookupLocation(locationtype); shtProductionReportList.Columns[(int)eColView.PROCESS].CellType = CtrlUtil.CreateReadOnlyPairCellType(dataProductionProcess); LookupData dataMachine = m_bizLookupData.LoadMachineAll(); shtProductionReportList.Columns[(int)eColView.MACHINE_NO].CellType = CtrlUtil.CreateReadOnlyPairCellType(dataMachine); LookupData dataPersonInCharge = m_bizLookupData.LoadPersonInCharge(); shtProductionReportList.Columns[(int)eColView.PERSON_IN_CHARGE].CellType = CtrlUtil.CreateReadOnlyPairCellType(dataPersonInCharge); NZString[] supplier = new NZString[2]; supplier[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor).ToNZString(); supplier[1] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor).ToNZString(); LookupData supplierData = m_bizLookupData.LoadLookupLocation(supplier); shtProductionReportList.Columns[(int)eColView.SUPPLIER].CellType = CtrlUtil.CreateReadOnlyPairCellType(supplierData); //NZString[] suppliertype = new NZString[1]; //04 = Supplier //suppliertype[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor).ToNZString(); //LookupData dataSupplier = m_bizLookupData.LoadLookupLocation(suppliertype); //shtProductionReportList.Columns[(int)eColView.Fo].CellType = CtrlUtil.CreateReadOnlyPairCellType(dataSupplier); shtProductionReportList.Columns[(int)eColView.REWORK].CellType = CtrlUtil.CreateCheckboxCellType(); shtProductionReportList.Columns[(int)eColView.REWORK].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; #endregion #region Export Type shtProductionReportList.Columns[(int)eColView.TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString(); shtProductionReportList.Columns[(int)eColView.MACHINE_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); #endregion #region Visible shtProductionReportList.Columns[(int)eColView.TRANS_ID].Visible = false; shtProductionReportList.Columns[(int)eColView.MACHINE_NAME].Visible = false; shtProductionReportList.Columns[(int)eColView.SHIFT_NAME].Visible = false; shtProductionReportList.Columns[(int)eColView.PROCESS_NAME].Visible = false; shtProductionReportList.Columns[(int)eColView.PERSON_IN_CHARGE_NAME].Visible = false; shtProductionReportList.Columns[(int)eColView.SUPPLIER_NAME].Visible = false; // 14 Feb 2013: hide lot no and cust lot no shtProductionReportList.Columns[(int)eColView.LOT_NO].Visible = false; shtProductionReportList.Columns[(int)eColView.CUST_LOT_NO].Visible = false; // end 14 Feb 2013 #endregion CtrlUtil.MappingDataFieldWithEnum(shtProductionReportList, typeof(eColView)); }