Ejemplo n.º 1
0
        private void TRN180_Load(object sender, EventArgs e)
        {
            InitializeScreen();

            LookupDataBIZ biz           = new LookupDataBIZ();
            LookupData    CustOrderType = biz.LoadLookupClassType(DataDefine.CUSTOMER_ORDER_DATE_FILTER.ToNZString());

            cboFilterDate.LoadLookupData(CustOrderType);
            cboFilterDate.SelectedIndex = 0;

            NZInt  dateType   = null;
            int    iDateValue = 0;
            object oDateValue = cboFilterDate.SelectedValue;

            if (oDateValue != null && Int32.TryParse(oDateValue.ToString(), out iDateValue))
            {
                dateType = new NZInt(null, iDateValue);
            }
            else
            {
                dateType = new NZInt(null, 1);
            }

            LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, dateType);
        }
Ejemplo n.º 2
0
        private void InitializeComboBox()
        {
            LookupDataBIZ bizLookupData = new LookupDataBIZ();

            cboStoredLoc.Format   += Common.ComboBox_Format;
            cboInventoryUM.Format += Common.ComboBox_Format;

            cboReasonCode.Format += Common.ComboBox_Format;

            NZString[] locationtype = new NZString[1];
            locationtype[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Production).ToNZString();
            LookupData locationLookup = bizLookupData.LoadLookupLocation(locationtype);

            cboStoredLoc.LoadLookupData(locationLookup);

            // Lookup Inventory U/M
            LookupData lookupInventoryUM = bizLookupData.LoadLookupClassType(new NZString(null, DataDefine.UM_CLS));

            cboInventoryUM.LoadLookupData(lookupInventoryUM);

            // Lookup Reason code
            LookupData lookupReason = bizLookupData.LoadLookupClassType(new NZString(null, DataDefine.ADJ_SUBTYPE));

            cboReasonCode.LoadLookupData(lookupReason);

            cboReasonCode.SelectedIndex  = -1;
            cboInventoryUM.SelectedIndex = -1;
            cboStoredLoc.SelectedIndex   = -1;
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
0
        private void InitialComboBox()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            // Lookup Lot Control
            LookupData lookupIssueType = bizLookup.LoadLookupClassType(new NZString(null, "TRANS_TYPE"));

            ReadOnlyPairCellType ItemTypecellType = new ReadOnlyPairCellType(lookupIssueType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.ISSUE_TYPE].CellType = ItemTypecellType;

            // Lookup OrderLoc
            LookupData           lookupOrderLoc = bizLookup.LoadLookupLocation();
            ReadOnlyPairCellType OrderLoc       = new ReadOnlyPairCellType(lookupOrderLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.FROM_LOC].CellType = OrderLoc;

            // Lookup StoreLoc
            LookupData           lookupStoreLoc = bizLookup.LoadLookupLocation();
            ReadOnlyPairCellType StoreLoc       = new ReadOnlyPairCellType(lookupStoreLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.TO_LOC].CellType = StoreLoc;

            // Lookup CustomerLoc
            LookupData           lookupCustomerLoc = bizLookup.LoadLookupLocation();
            ReadOnlyPairCellType CustomerLoc       = new ReadOnlyPairCellType(lookupCustomerLoc, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.FOR_CUSTOMER].CellType = CustomerLoc;

            // Lookup SubType
            LookupData           lookupSubType = bizLookup.LoadLookupClassType(DataDefine.ISSUE_SUBTYPE.ToNZString());
            ReadOnlyPairCellType SubType       = new ReadOnlyPairCellType(lookupSubType, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.TRAN_SUB_CLS].CellType = SubType;
        }
Ejemplo n.º 5
0
        private void InitializeSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            LookupDataBIZ biz = new LookupDataBIZ();

            NZString[] classInfos =
            {
                (NZString)DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receiving),
                (NZString)DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receive_Return)
            };

            LookupData receiveTypeLookupData = biz.LoadLookupClassType(DataDefine.TRANS_TYPE.ToNZString(), classInfos);

            shtView.Columns[(int)eColView.TRANS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(receiveTypeLookupData);

            LookupData locationLookupData = biz.LoadLookupLocation();

            shtView.Columns[(int)eColView.LOC_CD].CellType     = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData);
            shtView.Columns[(int)eColView.DEALING_NO].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 refTypeLookupData = biz.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString());

            shtView.Columns[(int)eColView.REF_SLIP_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(refTypeLookupData);

            shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));
        }
Ejemplo n.º 6
0
        private void LookupData()
        {
            string strTableName = EVOFramework.Data.DTOUtility.ReadTableName(typeof(MachineDTO));

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData MachineProjectData = biz.LoadLookupClassType(DataDefine.MACHINE_PROJECT.ToNZString());

            cboProject.LoadLookupData(MachineProjectData);
            cboProject.SelectedIndex = -1;

            NZString[] locationtype = new NZString[1];
            locationtype[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Production).ToNZString();
            LookupData ProductionProcessData = biz.LoadLookupLocation(locationtype);

            //LookupData ProductionProcessData = biz.LoadLookupClassType(DataDefine.PRODUCTION_PROCESS.ToNZString());
            cboProcess.LoadLookupData(ProductionProcessData);
            cboProcess.SelectedIndex = -1;

            //LookupData lookupMachineType = biz.LoadLookupTextHelper(strTableName, MachineDTO.eColumns.MACHINE_TYPE.ToString());
            //cboMachineType.LoadLookupData(lookupMachineType);
            //cboMachineType.SelectedIndex = -1;
            LookupData lookupMachineType = biz.LoadLookupClassType(DataDefine.MACHINE_TYPE.ToNZString());

            cboMachineType.LoadLookupData(lookupMachineType);
            cboMachineType.SelectedIndex = -1;

            LookupData lookupMachineGroup = biz.LoadLookupTextHelper(strTableName, MachineDTO.eColumns.MACHINE_GROUP.ToString());

            cboMachineGroup.LoadLookupData(lookupMachineGroup);
            cboMachineGroup.SelectedIndex = -1;
        }
Ejemplo n.º 7
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));
        }
Ejemplo n.º 8
0
        protected void MAS051_ReigsterBOM_Load(object sender, EventArgs e)
        {
            txtItemCode.KeyPress      += CtrlUtil.SetNextControl;
            txtItemDesc.KeyPress      += CtrlUtil.SetNextControl;
            txtUpperQty.KeyPress      += CtrlUtil.SetNextControl;
            txtLowerQty.KeyPress      += CtrlUtil.SetNextControl;
            cboOrderLoc.KeyPress      += CtrlUtil.SetNextControl;
            chkChildOrderLoc.KeyPress += CtrlUtil.SetNextControl;
            cboMRPFlag.KeyPress       += CtrlUtil.SetNextControl;
            chkMRPFlag.KeyPress       += CtrlUtil.SetNextControl;

            cboOrderLoc.Format += Common.ComboBox_Format;
            cboMRPFlag.Format  += Common.ComboBox_Format;

            txtUpperQty.PathValue = 1;
            txtLowerQty.PathValue = 1;

            CtrlUtil.EnabledControl(false, txtParentItemCode, txtParentItemDesc, txtItemDesc);
            CtrlUtil.EnabledControl(true, txtItemCode, txtUpperQty, txtLowerQty, cboOrderLoc, cboMRPFlag);

            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();
            LookupData    locationData    = m_bizLookupData.LoadLookupLocation();

            cboOrderLoc.LoadLookupData(locationData);
            cboOrderLoc.SelectedIndex = -1;

            LookupData lookupMRPFlag = m_bizLookupData.LoadLookupClassType(DataDefine.MRP_FLAG.ToNZString());

            cboMRPFlag.LoadLookupData(lookupMRPFlag);
            cboMRPFlag.SelectedIndex = -1;

            chkChildOrderLoc_CheckedChanged(this, null);
            chkMRPFlag_CheckedChanged(this, null);
        }
Ejemplo n.º 9
0
        private void InitializeSpread()
        {
            shtCustomerOrderList.ActiveSkin = Common.ACTIVE_SKIN;

            shtCustomerOrderList.Columns[(int)eColView.ORDER_DETAIL_NO].Visible = false;
            shtCustomerOrderList.Columns[(int)eColView.LOC_DESC].Visible        = false;

            LookupDataBIZ biz = new LookupDataBIZ();

            NZString[] customerInfo = { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer)
                                        , (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor)
                                        , (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor) };

            LookupData customerLookup = biz.LoadLookupLocation(customerInfo);

            shtCustomerOrderList.Columns[(int)eColView.CUSTOMER_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(customerLookup);

            LookupData orderTypeLookup = biz.LoadLookupClassType(DataDefine.CUSTOMER_ORDER_TYPE.ToNZString());

            shtCustomerOrderList.Columns[(int)eColView.ORDER_TYPE].CellType = CtrlUtil.CreateReadOnlyPairCellType(orderTypeLookup);

            //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 refTypeLookupData = biz.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString());
            //shtView.Columns[(int)eColView.REF_SLIP_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(refTypeLookupData);

            //shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
            CtrlUtil.MappingDataFieldWithEnum(shtCustomerOrderList, typeof(eColView));
            CtrlUtil.SpreadUpdateColumnSorting(shtCustomerOrderList);
        }
Ejemplo n.º 10
0
        private void InitailSpread()
        {
            shtDelivery.ActiveSkin = CommonLib.Common.ACTIVE_SKIN;

            CtrlUtil.MappingDataFieldWithEnum(shtDelivery, typeof(eColView));

            //shtView.Columns[(int)eColView.SHIP_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            shtDelivery.Columns[(int)eColView.TRANS_ID].StyleName       = DataDefine.EXPORT_LAST.ToString();
            shtDelivery.Columns[(int)eColView.GROUP_TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString();
            shtDelivery.Columns[(int)eColView.LOC_CD].StyleName         = DataDefine.NO_EXPORT.ToString();
            shtDelivery.Columns[(int)eColView.CURRENCY].StyleName       = DataDefine.NO_EXPORT.ToString();
            shtDelivery.Columns[(int)eColView.RETURN_QTY].StyleName     = DataDefine.NO_EXPORT.ToString();

            shtDelivery.Columns[(int)eColView.TRANS_ID].Visible        = false;
            shtDelivery.Columns[(int)eColView.GROUP_TRANS_ID].Visible  = false;
            shtDelivery.Columns[(int)eColView.ORDER_DETAIL_NO].Visible = false;
            shtDelivery.Columns[(int)eColView.LOC_CD].Visible          = false;
            shtDelivery.Columns[(int)eColView.LOC_DESC].Visible        = false;
            shtDelivery.Columns[(int)eColView.CURRENCY].Visible        = false;
            shtDelivery.Columns[(int)eColView.RETURN_QTY].Visible      = false;

            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();

            LookupData locData = m_bizLookupData.LoadLookupLocation();

            shtDelivery.Columns[(int)eColView.DEALING_NO].CellType = CtrlUtil.CreateReadOnlyPairCellType(locData);
        }
Ejemplo n.º 11
0
        private void InitialComboBox()
        {
            cboToLoc.Format       += Common.ComboBox_Format;
            cboFromLoc.Format     += Common.ComboBox_Format;
            cboForCustomer.Format += CommonLib.Common.ComboBox_Format;
            cboSubType.Format     += CommonLib.Common.ComboBox_Format;

            LookupDataBIZ bizLookup = new LookupDataBIZ();
            // Lookup From Loc
            LookupData lookupLocationFrom = bizLookup.LoadLookupLocation();

            cboFromLoc.LoadLookupData(lookupLocationFrom);
            // Lookup To Loc
            LookupData lookupLocationTo = bizLookup.LoadLookupLocation();

            cboToLoc.LoadLookupData(lookupLocationTo);

            // Lookup To CustomerLocation
            LookupData lookupCustomer = bizLookup.LoadLookupLocation(new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer)
                                                                                      , (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor) });

            cboForCustomer.LoadLookupData(lookupCustomer);

            // Lookup SubType
            LookupData lookupSubType = bizLookup.LoadLookupClassType(new NZString(null, "ISSUE_SUBTYPE"));

            cboSubType.LoadLookupData(lookupSubType);
        }
Ejemplo n.º 12
0
        private void LookupData()
        {
            LookupDataBIZ biz = new LookupDataBIZ();

            NZString[] locationClsType = new NZString[3];
            locationClsType[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer).ToNZString();
            locationClsType[1] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor).ToNZString();
            locationClsType[2] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor).ToNZString();

            LookupData lookupData = biz.LoadLookupClassType(DataDefine.LOCATION_CLS.ToNZString(), locationClsType);

            cboDealingType.LoadLookupData(lookupData);
            cboDealingType.SelectedIndex = -1;

            LookupData termOfPayment = biz.LoadLookupClassType(DataDefine.TERM_OF_PAYMENT.ToNZString());

            cboTermOfPayment.LoadLookupData(termOfPayment);
            cboTermOfPayment.SelectedIndex = -1;

            LookupData InvoicePattern = biz.LoadLookupClassType(DataDefine.INVOICE_PATTERN.ToNZString());

            cboInvoicePattern.LoadLookupData(InvoicePattern);
            cboInvoicePattern.SelectedIndex = -1;


            LookupData lookupData2 = biz.LoadLookupClassType(DataDefine.MRP_LOCATION.ToNZString());
        }
Ejemplo n.º 13
0
        private void InitialComboBox()
        {
            cboFromLoc.Format     += CommonLib.Common.ComboBox_Format;
            cboInventoryUM.Format += CommonLib.Common.ComboBox_Format;
            cboToLoc.Format       += CommonLib.Common.ComboBox_Format;
            cboForCustomer.Format += CommonLib.Common.ComboBox_Format;
            //cboSubType.Format += CommonLib.Common.ComboBox_Format;
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            // Lookup To Location
            LookupData lookupOrderLocation = bizLookup.LoadLookupLocation(null);

            cboToLoc.LoadLookupData(lookupOrderLocation);

            // Lookup From Location
            LookupData lookupStoreLocation = bizLookup.LoadLookupLocation(null);

            cboFromLoc.LoadLookupData(lookupStoreLocation);

            // Lookup Inventory U/M
            LookupData lookupInventoryUM = bizLookup.LoadLookupClassType(DataDefine.UM_CLS.ToNZString());

            cboInventoryUM.LoadLookupData(lookupInventoryUM);

            // Lookup To CustomerLocation
            LookupData lookupCustomer = bizLookup.LoadLookupLocation(new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer)
                                                                                      , (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor) });

            cboForCustomer.LoadLookupData(lookupCustomer);

            //// Lookup SubType
            //LookupData lookupSubType = bizLookup.LoadLookupClassType(new NZString(null, "ISSUE_SUBTYPE"));
            //cboSubType.LoadLookupData(lookupSubType);
        }
Ejemplo n.º 14
0
        private void LoadLookupCellType()
        {
            LookupDataBIZ        biz              = new LookupDataBIZ();
            LookupData           currencyData     = biz.LoadLookupClassType(DataDefine.CURRENCY.ToNZString());
            ReadOnlyPairCellType cellCurrencyType = new ReadOnlyPairCellType(currencyData, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.CURRENCY].CellType = cellCurrencyType;
        }
Ejemplo n.º 15
0
        private void InitializeComboBox()
        {
            cboBOMStatus.Format += Common.ComboBox_Format;
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            LookupData lookupItemType = bizLookup.LoadLookupClassType(new NZString(null, "BOM_STATUS"));

            cboBOMStatus.LoadLookupData(lookupItemType);
        }
Ejemplo n.º 16
0
 private void LookupLotNo(int ActiveRow, NZString ItemCD, NZString LocCD)
 {
     // Load Lot control
     LookupDataBIZ bizLookup = new LookupDataBIZ();
     // Lookup Lot No
     //LookupData lookupLotNo = bizLookup.LoadLookupLotNo(ItemCD, LocCD, dtDeliveryDate.Value.Value.ToString("yyyyMM").ToNZString());
     //shtCustomerOrder.Cells[ActiveRow, (int)eColView.LOT_NO].CellType = CreateLotNoCellType(lookupLotNo);
     //((ComboBoxCellType)shtCustomerOrder.Cells[ActiveRow, (int)eColView.LOT_NO].CellType).Editable = true;
     //((ComboBoxCellType)shtCustomerOrder.Cells[ActiveRow, (int)eColView.LOT_NO].CellType).AutoSearch = true;
 }
Ejemplo n.º 17
0
        private void InitialComboBox()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();


            LookupData lookupOPERATION_TYPE = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.OPERATION_TYPE));

            ReadOnlyPairCellType OPERATION_TYPE = new ReadOnlyPairCellType(lookupOPERATION_TYPE, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.OPERATION_TYPE].CellType = OPERATION_TYPE;

            LookupData lookupTRANS_CLS = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.TRANS_TYPE));

            ReadOnlyPairCellType TRANS_CLS = new ReadOnlyPairCellType(lookupTRANS_CLS, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.TRANS_CLS].CellType = TRANS_CLS;

            LookupData lookupIN_OUT_CLS = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.IN_OUT_CLASS));

            ReadOnlyPairCellType IN_OUT_CLS = new ReadOnlyPairCellType(lookupIN_OUT_CLS, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.IN_OUT_CLS].CellType = IN_OUT_CLS;

            // Lookup StoreLoc
            LookupData           lookupStoreLoc = bizLookup.LoadLookupLocation();
            ReadOnlyPairCellType StoreLoc       = new ReadOnlyPairCellType(lookupStoreLoc, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.LOC_CD].CellType = StoreLoc;

            // Lookup CustomerLoc
            LookupData           lookupCustomerLoc = bizLookup.LoadLookupLocation();
            ReadOnlyPairCellType CustomerLoc       = new ReadOnlyPairCellType(lookupCustomerLoc, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.FOR_CUSTOMER].CellType = CustomerLoc;

            // Lookup SubType
            LookupData           lookupSubType = bizLookup.LoadLookupClassType(DataDefine.ISSUE_SUBTYPE.ToNZString());
            ReadOnlyPairCellType SubType       = new ReadOnlyPairCellType(lookupSubType, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.TRAN_SUB_CLS].CellType = SubType;

            LookupData           lookupSHIFT_CLS = bizLookup.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());
            ReadOnlyPairCellType SHIFT_CLS       = new ReadOnlyPairCellType(lookupSHIFT_CLS, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.SHIFT_CLS].CellType = SHIFT_CLS;

            LookupData           lookupSCREEN_TYPE = bizLookup.LoadLookupClassType(DataDefine.SCREEN_TYPE.ToNZString());
            ReadOnlyPairCellType SCREEN_TYPE       = new ReadOnlyPairCellType(lookupSCREEN_TYPE, Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.SCREEN_TYPE].CellType = SCREEN_TYPE;

            LookupData lookupSCREEN_TYPE_CBO = bizLookup.LoadLookupClassType(DataDefine.SCREEN_TYPE.ToNZString());

            cboScreenType.LoadLookupData(lookupSCREEN_TYPE_CBO);
        }
Ejemplo n.º 18
0
        private void InitialScreen()
        {
            //txtFilter.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput;
            //txtFilter.KeyUp += CommonLib.CtrlUtil.FilterRestrictChar;

            // add search button
            tsbSearch       = new ToolStripButton("Refresh");
            tsbSearch.Image = Forms.Properties.Resources.REFRESH;
            tslControl.Items.Insert(0, tsbSearch);
            tsbSearch.Click += tsbSearch_Click;

            // add Export Cost button
            tsbExportCost       = new ToolStripButton("Export Cost");
            tsbExportCost.Image = Forms.Properties.Resources.EXPORT;
            tslControl.Items.Add(tsbExportCost);
            tsbExportCost.Click += new EventHandler(tsbExportCost_Click);

            //Disable function
            tsbExportCost.Visible = false;

            chkToEndMonth.Checked = false;
            CtrlUtil.EnabledControl(false, dtPeriodEnd);

            shtView.ActiveSkin = Common.ACTIVE_SKIN;
            MapSpreadData();

            LookupDataBIZ bizLookup = new LookupDataBIZ();

            switch (Common.CurrentUserInfomation.DateFormat)
            {
            case eDateFormat.YMD:
                dtPeriodBegin.Format = "yyyy/MM";
                break;

            case eDateFormat.MDY:
            case eDateFormat.DMY:
                dtPeriodBegin.Format = "MM/yyyy";
                break;
            }

            dtPeriodEnd.Format = Common.CurrentUserInfomation.DateFormatString;

            rdoGroupItem.Checked = true;
            LoadDefaultPeriod();

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData locationLookupData = biz.LoadLookupLocation();

            shtView.Columns[(int)eColView.CUSTOMER_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData);


            LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, txtFilter.Text.Trim(), false);
        }
Ejemplo n.º 19
0
        private void LookupData()
        {
            LookupDataBIZ biz          = new LookupDataBIZ();
            LookupData    currencyData = biz.LoadLookupClassType(DataDefine.CURRENCY.ToNZString());

            cboCurrency.LoadLookupData(currencyData);
            cboCurrency.SelectedIndex = -1;

            //LookupData lookupData2 = biz.LoadLookupClassType(DataDefine.MRP_LOCATION.ToNZString());
            //cboMRPLocation.LoadLookupData(lookupData2);
            //cboMRPLocation.SelectedIndex = -1;
        }
Ejemplo n.º 20
0
        private void InitialComboBox()
        {
            cboLocation.Format += Common.ComboBox_Format;
            LookupDataBIZ bizLookup = new LookupDataBIZ();
            DealingDTO    dto       = new DealingDTO();

            dto.LOC_CD   = "All".ToNZString();
            dto.LOC_DESC = "All Location".ToNZString();
            LookupData lookupLocation = bizLookup.LoadLookupLocation_AddDummy(dto);

            cboLocation.LoadLookupData(lookupLocation);
        }
Ejemplo n.º 21
0
        private void InitialSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;
            LookupDataBIZ biz             = new LookupDataBIZ();
            LookupData    shiftLookupData = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());

            shtView.Columns[(int)eColumns.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftLookupData);
            LookupData workresultLookupData = biz.LoadLookupClassType(DataDefine.TRAN_SUB_CLS.ToNZString());

            shtView.Columns[(int)eColumns.TRAN_SUB_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(workresultLookupData);

            shtView.Columns[(int)eColumns.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
        }
Ejemplo n.º 22
0
        private void InitialSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));

            LookupDataBIZ biz                    = new LookupDataBIZ();
            LookupData    lookupItemClass        = biz.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString());
            LookupData    lookupLotControlClass  = biz.LoadLookupClassType(DataDefine.LOT_CONTROL_CLS.ToNZString());
            LookupData    lookupConsumptionClass = biz.LoadLookupClassType(DataDefine.CONSUMPTION_CLS.ToNZString());

            shtView.Columns[(int)eColView.ITEM_CLS].CellType        = CtrlUtil.CreateReadOnlyPairCellType(lookupItemClass);
            shtView.Columns[(int)eColView.LOT_CONTROL_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(lookupLotControlClass);
            shtView.Columns[(int)eColView.CONSUMTION_CLS].CellType  = CtrlUtil.CreateReadOnlyPairCellType(lookupConsumptionClass);
        }
Ejemplo n.º 23
0
        private void InitializeLookupData()
        {
            LookupDataBIZ lookupDataBiz  = new LookupDataBIZ();
            LookupData    adjustmentType = lookupDataBiz.LoadLookupClassType(DataDefine.IN_OUT_CLASS.ToNZString());

            shtView.Columns[(int)eColView.IN_OUT_CLS].CellType = new ReadOnlyPairCellType(adjustmentType, Common.COMBOBOX_SEPERATOR_SYMBOL);

            LookupData reasonCode = lookupDataBiz.LoadLookupClassType(DataDefine.ADJ_SUBTYPE.ToNZString());

            shtView.Columns[(int)eColView.TRAN_SUB_CLS].CellType = new ReadOnlyPairCellType(reasonCode, Common.COMBOBOX_SEPERATOR_SYMBOL);

            LookupData stockLocation = lookupDataBiz.LoadLookupLocation();

            shtView.Columns[(int)eColView.LOC_CD].CellType = new ReadOnlyPairCellType(stockLocation, Common.COMBOBOX_SEPERATOR_SYMBOL);
        }
Ejemplo n.º 24
0
        private void InitialComboBox()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            // Lookup Lot Control
            LookupData lookupTransType = bizLookup.LoadLookupClassType(new NZString(null, "TRANS_TYPE"));

            //ReadOnlyPairCellType TransTypecellType = new ReadOnlyPairCellType(lookupTransType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);
            //shtView.Columns[(int)eColView.SHIP_TYPE].CellType = TransTypecellType;

            //// Lookup OrderLoc
            //LookupData lookupStoreLoc = bizLookup.LoadLookupLocation();
            //ReadOnlyPairCellType StoreLoc = new ReadOnlyPairCellType(lookupStoreLoc, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);
            //shtView.Columns[(int)eColView.STORED_LOC].CellType = StoreLoc;
        }
Ejemplo n.º 25
0
        private void InitializeSpread()
        {
            shtReturnProductList.ActiveSkin = Common.ACTIVE_SKIN;

            //LookupDataBIZ biz = new LookupDataBIZ();
            //NZString[] classInfos = {
            //                            (NZString) DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receiving),
            //                            (NZString) DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receive_Return)
            //                        };

            //LookupData receiveTypeLookupData = biz.LoadLookupClassType(DataDefine.TRANS_TYPE.ToNZString(), classInfos);
            //shtView.Columns[(int)eColView.TRANS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(receiveTypeLookupData);

            //LookupData locationLookupData = biz.LoadLookupLocation();
            //shtView.Columns[(int)eColView.LOC_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData);
            //shtView.Columns[(int)eColView.DEALING_NO].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 refTypeLookupData = biz.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString());
            //shtView.Columns[(int)eColView.REF_SLIP_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(refTypeLookupData);

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

            shtReturnProductList.Columns[(int)eColView.SLIP_NO].StyleName           = DataDefine.NO_EXPORT.ToString();
            shtReturnProductList.Columns[(int)eColView.RETURN_TRANS_ID].StyleName   = DataDefine.EXPORT_LAST.ToString();
            shtReturnProductList.Columns[(int)eColView.TRANS_ID].StyleName          = DataDefine.EXPORT_LAST.ToString();
            shtReturnProductList.Columns[(int)eColView.DELIVERY_TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString();

            shtReturnProductList.Columns[(int)eColView.SLIP_NO].Visible           = false;
            shtReturnProductList.Columns[(int)eColView.RETURN_TRANS_ID].Visible   = false;
            shtReturnProductList.Columns[(int)eColView.TRANS_ID].Visible          = false;
            shtReturnProductList.Columns[(int)eColView.DELIVERY_TRANS_ID].Visible = false;
            shtReturnProductList.Columns[(int)eColView.LOC_DESC].Visible          = false;

            CtrlUtil.MappingDataFieldWithEnum(shtReturnProductList, typeof(eColView));


            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();

            LookupData locData = m_bizLookupData.LoadLookupLocation();

            shtReturnProductList.Columns[(int)eColView.DEALING_NO].CellType = CtrlUtil.CreateReadOnlyPairCellType(locData);
        }
Ejemplo n.º 26
0
        private void InitializeLookupData()
        {
            LookupDataBIZ biz            = new LookupDataBIZ();
            LookupData    locationLookup = biz.LoadLookupLocation();

            NZString[] SupplierType = new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor),
                                                       (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Vendor) };
            LookupData SupplierLookup = biz.LoadLookupLocation(SupplierType);

            cboStoredLoc.LoadLookupData(locationLookup);
            cboSupplierCode.LoadLookupData(SupplierLookup);

            LookupData umClsData = biz.LoadLookupClassType(DataDefine.UM_CLS.ToNZString());

            shtView.Columns[(int)eColView.ORDER_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(umClsData);
            shtView.Columns[(int)eColView.INV_UM_CLS].CellType   = CtrlUtil.CreateReadOnlyPairCellType(umClsData);
        }
Ejemplo n.º 27
0
        private void cboItemType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboItemType.SelectedValue != null && cboItemType.SelectedValue != DBNull.Value)
            {
                if (cboItemType.SelectedValue.ToString() == Rubik.DataDefine.Convert2ClassCode(Rubik.DataDefine.eITEM_CLS.RawMaterial))
                {
                    CtrlUtil.EnabledControl(true, cboItemClassMinor04);
                    LookupDataBIZ biz  = new LookupDataBIZ();
                    LookupData    data = biz.LoadLookupClassType((NZString)Rubik.DataDefine.ITEM_CLS_MINOR04);
                    cboItemClassMinor04.LoadLookupData(data);

                    cboItemClassMinor04.SelectedIndex = -1;
                    return;
                }
            }
            cboItemClassMinor04.DataSource = null;
            CtrlUtil.EnabledControl(false, cboItemClassMinor04);
        }
Ejemplo n.º 28
0
        private void InitializeScreen()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            // Mapping DataField.
            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));

            txtItem.KeyPress      += CtrlUtil.SetNextControl;
            txtLocation.KeyPress  += CtrlUtil.SetNextControl;
            txtLotNo.KeyPress     += CtrlUtil.SetNextControl;
            txtInvPeriod.KeyPress += CtrlUtil.SetNextControl;
            txtOnHandQty.KeyPress += CtrlUtil.SetNextControl;
            cboItemType.KeyPress  += CtrlUtil.SetNextControl;


            // Set default Column Cell Type.
            LookupDataBIZ bizLookupData = new LookupDataBIZ();

            LookupData transTypelookupData    = bizLookupData.LoadLookupClassType(DataDefine.TRANS_TYPE.ToNZString());
            LookupData refClassTypelookupData = bizLookupData.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString());

            shtView.Columns[(int)eColView.TRANS_INFO].CellType = CtrlUtil.CreateReadOnlyPairCellType(transTypelookupData);
            shtView.Columns[(int)eColView.REF_TYPE].CellType   = CtrlUtil.CreateReadOnlyPairCellType(refClassTypelookupData);
            shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString);

            cboItemType.Format += Common.ComboBox_Format;
            LookupData itemTypelookupData = bizLookupData.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString());

            cboItemType.LoadLookupData(itemTypelookupData);
            // Enable/Disable Controls
            CtrlUtil.EnabledControl(false, txtItem, txtLocation, txtLotNo, txtInvPeriod, txtOnHandQty, txtUnitMeasure, txtPackNo);
            CtrlUtil.EnabledControl(true, fpView);

            // Load data.
            txtItem.Text      = ItemCode.NVL(string.Empty);
            txtLocation.Text  = WareHouseCode.NVL(string.Empty);
            txtLotNo.Text     = LotNo.NVL(string.Empty);
            txtInvPeriod.Text = String.Format("{0} - {1}",
                                              CtrlUtil.ConvertDateTimeToCurrentFormat(PeriodBeginDate),
                                              CtrlUtil.ConvertDateTimeToCurrentFormat(PeriodEndDate));

            CtrlUtil.EnabledControl(false, cboItemType);
            LoadData();
        }
Ejemplo n.º 29
0
        private void LoadLookupCellType()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            LookupData           locationTypeData = bizLookup.LoadLookupClassType(DataDefine.LOCATION_CLS.ToNZString());
            ReadOnlyPairCellType cellProcess      = new ReadOnlyPairCellType(locationTypeData, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);

            shtView.Columns[(int)eColView.LOC_CLS].CellType = cellProcess;

            LookupData           termOfPayment = bizLookup.LoadLookupClassType(DataDefine.TERM_OF_PAYMENT.ToNZString());
            ReadOnlyPairCellType cellProcess1  = new ReadOnlyPairCellType(termOfPayment, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL, false);

            shtView.Columns[(int)eColView.TERM_OF_PAYMENT].CellType = cellProcess1;

            LookupData           invoicePattern = bizLookup.LoadLookupClassType(DataDefine.INVOICE_PATTERN.ToNZString());
            ReadOnlyPairCellType cellProcess2   = new ReadOnlyPairCellType(invoicePattern, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL, false);

            shtView.Columns[(int)eColView.INVOICE_PATTERN].CellType = cellProcess2;
        }
Ejemplo n.º 30
0
        private void InitializeScreen()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));

            txtSearch.KeyPress += CtrlUtil.SetNextControl;

            //------------ Location --------------------//
            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();
            //LookupData locationData = m_bizLookupData.LoadLookupLocation(null, null);
            LookupData locationData = m_bizLookupData.LoadLookupClassType(DataDefine.LOCATION_CLS.ToNZString());

            shtView.Columns[(int)eColView.LOC_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationData);

            LoadItemData(txtSearch.Text);

            IsSelected = false;
        }