Beispiel #1
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));
        }
Beispiel #2
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));
        }
Beispiel #3
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));
        }
Beispiel #4
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);
        }
Beispiel #5
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);
        }
Beispiel #6
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);
        }
Beispiel #7
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();
        }
Beispiel #8
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);
        }
Beispiel #9
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);
        }
Beispiel #10
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);
        }
Beispiel #11
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();
        }
Beispiel #12
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;
        }
Beispiel #13
0
        private void InitializeSpread()
        {
            shtMovePartList.ActiveSkin = Common.ACTIVE_SKIN;

            LookupDataBIZ biz = new LookupDataBIZ();

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

            shtMovePartList.Columns[(int)eColView.FROM_PROCESS].CellType = CtrlUtil.CreateReadOnlyPairCellType(fromProcess);

            LookupData toProcess = biz.LoadLookupLocation(locationtype);

            shtMovePartList.Columns[(int)eColView.TO_PROCESS].CellType = CtrlUtil.CreateReadOnlyPairCellType(toProcess);

            LookupData moveReason = biz.LoadLookupClassType(DataDefine.MOVE_REASON.ToNZString());

            shtMovePartList.Columns[(int)eColView.REASON].CellType = CtrlUtil.CreateReadOnlyPairCellType(moveReason);

            LookupData shiftCls = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());

            shtMovePartList.Columns[(int)eColView.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftCls);

            shtMovePartList.Columns[(int)eColView.MOVE_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            shtMovePartList.Columns[(int)eColView.TRANS_ID_FROM].StyleName = DataDefine.EXPORT_LAST.ToString();
            shtMovePartList.Columns[(int)eColView.TRANS_ID_TO].StyleName   = DataDefine.EXPORT_LAST.ToString();
            shtMovePartList.Columns[(int)eColView.CUSTOMER_CD].StyleName   = DataDefine.NO_EXPORT.ToString();
            shtMovePartList.Columns[(int)eColView.WEIGHT].StyleName        = DataDefine.NO_EXPORT.ToString();

            shtMovePartList.Columns[(int)eColView.TRANS_ID_FROM].Visible     = false;
            shtMovePartList.Columns[(int)eColView.TRANS_ID_TO].Visible       = false;
            shtMovePartList.Columns[(int)eColView.CUSTOMER_CD].Visible       = false;
            shtMovePartList.Columns[(int)eColView.SHIFT_CLS_NAME].Visible    = false;
            shtMovePartList.Columns[(int)eColView.FROM_PROCESS_NAME].Visible = false;
            shtMovePartList.Columns[(int)eColView.TO_PROCESS_NAME].Visible   = false;
            shtMovePartList.Columns[(int)eColView.REASON_NAME].Visible       = false;
            shtMovePartList.Columns[(int)eColView.WEIGHT].Visible            = false;

            CtrlUtil.MappingDataFieldWithEnum(shtMovePartList, typeof(eColView));
        }
Beispiel #14
0
        private void InitializeSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            LookupDataBIZ biz = new LookupDataBIZ();


            LookupData locationLookupData = biz.LoadLookupLocation();

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

            LookupData shiftLookupData = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());

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


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

            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));
        }
Beispiel #15
0
        private void LoadLookupCellType()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            LookupData locationLookup = bizLookup.LoadLookupLocation();

            this.shtItemView.Columns[(int)eColView.CUSTOMER_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookup);

            //// Lookup Item Type
            //LookupData lookupItemType = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.ITEM_CLS));

            //// Lookup Lot Control
            //LookupData lookupLotControl = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.LOT_CONTROL_CLS));

            //ReadOnlyPairCellType ItemTypecellType = new ReadOnlyPairCellType(lookupItemType, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);
            //shtItemView.Columns[(int)eColView.ITEM_CLS].CellType = ItemTypecellType;

            //shtItemView.Columns[(int)eColView.ITEM_CLS_MINOR].CellType = CtrlUtil.CreateReadOnlyPairCellType(bizLookup.LoadLookupClassType((NZString)DataDefine.ITEM_CLS_MINOR04));
            //ReadOnlyPairCellType LotControlcellType = new ReadOnlyPairCellType(lookupLotControl, CommonLib.Common.COMBOBOX_SEPERATOR_SYMBOL);
            //shtItemView.Columns[(int)eColView.LOT_CONTROL_CLS].CellType = LotControlcellType;
        }
Beispiel #16
0
        private void InitialSpread()
        {
            LookupDataBIZ biz = new LookupDataBIZ();
            LookupData    locationLookupData = biz.LoadLookupLocation();

            shtViewHeader.Columns[(int)eHeader.OrderLocCD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData);

            if (shtViewHeader.Columns.Count > 0)
            {
                SpreadVisibleColumn(false, shtViewHeader, (int)eHeader.ItemCLS,
                                    (int)eHeader.OrderProcessCLS,
                                    (int)eHeader.InvUMCLS,
                                    (int)eHeader.OrderUMCLS,
                                    (int)eHeader.MaxCapacity,
                                    (int)eHeader.InventoryQty
                                    );
            }
            if (shtViewDetail.Columns.Count > 0)
            {
                SpreadVisibleColumn(false, shtViewDetail, (int)eDetail.ItemCD, (int)eDetail.OrderLocCD, (int)eDetail.RecordNo);
            }
        }
Beispiel #17
0
        private void LoadLookupCellType()
        {
            LookupDataBIZ bizLookup = new LookupDataBIZ();

            // Lookup Item Type
            LookupData lookupItemType = bizLookup.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString());
            // Lookup Lot Control
            LookupData lookupLotControl = bizLookup.LoadLookupClassType(DataDefine.LOT_CONTROL_CLS.ToNZString());
            // Lookup Consumption
            LookupData lookupConsumption = bizLookup.LoadLookupClassType(new NZString(null, DataDefine.CONSUMPTION_CLS));
            // Lookup Location
            LookupData lookupLocation = bizLookup.LoadLookupLocation();


            shtItemView.Columns[(int)eColView.UPPER_ITEM_CLS].CellType     = CtrlUtil.CreateReadOnlyPairCellType(lookupItemType);
            shtItemView.Columns[(int)eColView.LOWER_ITEM_CLS].CellType     = CtrlUtil.CreateReadOnlyPairCellType(lookupItemType);
            shtItemView.Columns[(int)eColView.LOT_CONTROL_CLS].CellType    = CtrlUtil.CreateReadOnlyPairCellType(lookupLotControl);
            shtItemView.Columns[(int)eColView.CONSUMTION_CLS].CellType     = CtrlUtil.CreateReadOnlyPairCellType(lookupConsumption);
            shtItemView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType  = CtrlUtil.CreateReadOnlyPairCellType(lookupLocation);
            shtItemView.Columns[(int)eColView.ORDER_LOC_CD].CellType       = CtrlUtil.CreateReadOnlyPairCellType(lookupLocation);
            shtItemView.Columns[(int)eColView.STORE_LOC_CD].CellType       = CtrlUtil.CreateReadOnlyPairCellType(lookupLocation);
            shtItemView.Columns[(int)eColView.CHILD_ORDER_LOC_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(lookupLocation);
        }
Beispiel #18
0
        private void InitializeSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData locationLookupData = biz.LoadLookupLocation();

            shtView.Columns[(int)eColView.CUSTOMER_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();
            //shtView.Columns[(int)eColView.UPD_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
            //shtView.Columns[(int)eColView.AT_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            //shtView.Columns[(int)eColView.IS_ACTIVE].CellType = CtrlUtil.CreateCheckboxCellType("","");

            int[] iHideColumn =
            {
                (int)eColView.CRT_BY,
                (int)eColView.CRT_DATE,
                (int)eColView.CRT_MACHINE,
                (int)eColView.UPD_BY,
                (int)eColView.UPD_DATE,
                (int)eColView.UPD_MACHINE,
                (int)eColView.IS_ACTIVE,
                (int)eColView.ORDER_TYPE,
                (int)eColView.PRIORITY,
                (int)eColView.Reserve,
                (int)eColView.REVISION,
                (int)eColView.ORDER_ID,
                (int)eColView.YEAR_MONTH
            };
            for (int iColumn = 0; iColumn < iHideColumn.Length; iColumn++)
            {
                shtView.Columns[iHideColumn[iColumn]].Visible = false;
            }


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

            shtView.Columns[(int)eColView.DUE_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
        }
Beispiel #19
0
        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;
            }
        }