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)); }