Exemple #1
0
        private void InitializeSpread()
        {
            shtPackingList.ActiveSkin = Common.ACTIVE_SKIN;

            #region Initial Cell Type

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData shiftCls = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());
            shtPackingList.Columns[(int)eColView.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftCls);

            LookupData PersonInCharge = biz.LoadPersonInCharge();
            shtPackingList.Columns[(int)eColView.PERSON_IN_CHARGE].CellType = CtrlUtil.CreateReadOnlyPairCellType(PersonInCharge);

            shtPackingList.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            #endregion

            #region Initial export column

            shtPackingList.Columns[(int)eColView.TRANS_ID].StyleName       = DataDefine.EXPORT_LAST.ToString();
            shtPackingList.Columns[(int)eColView.GROUP_TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString();

            shtPackingList.Columns[(int)eColView.TRANS_ID].Visible              = false;
            shtPackingList.Columns[(int)eColView.GROUP_TRANS_ID].Visible        = false;
            shtPackingList.Columns[(int)eColView.SHIFT_CLS_NAME].Visible        = false;
            shtPackingList.Columns[(int)eColView.PERSON_IN_CHARGE_NAME].Visible = false;

            #endregion

            CtrlUtil.MappingDataFieldWithEnum(shtPackingList, typeof(eColView));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        private void InitializeLookupData()
        {
            LookupData lookupShiftCls = m_bizLookupData.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());

            cboShiftCls.LoadLookupData(lookupShiftCls);
            cboShiftCls.SelectedIndex = -1;

            LookupData personInCharge = m_bizLookupData.LoadPersonInCharge();

            evoComboBox1.LoadLookupData(personInCharge);
            evoComboBox1.SelectedIndex = -1;
        }