Пример #1
0
        protected virtual void INItemClassRep_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            INItemClassRep row = (INItemClassRep)e.Row;

            if (row != null)
            {
                bool isTransfer     = (row.ReplenishmentSource == INReplenishmentSource.Transfer);
                bool isFixedReorder = (row.ReplenishmentMethod == INReplenishmentMethod.FixedReorder);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.transferLeadTime>(sender, e.Row, isTransfer);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.transferERQ>(sender, e.Row, isTransfer && isFixedReorder);
                PXDefaultAttribute.SetPersistingCheck <INItemClassRep.transferLeadTime>(sender, e.Row, isTransfer ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
                PXDefaultAttribute.SetPersistingCheck <INItemClassRep.transferERQ>(sender, e.Row, (isTransfer && isFixedReorder) ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
            }
        }
Пример #2
0
        protected virtual void INItemClassRep_ReplenishmentSource_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            INItemClassRep r = e.Row as INItemClassRep;

            if (r == null)
            {
                return;
            }
            if (r.ReplenishmentSource == INReplenishmentSource.PurchaseToOrder || r.ReplenishmentSource == INReplenishmentSource.DropShipToOrder)
            {
                sender.SetValueExt <INItemClassRep.replenishmentMethod>(r, INReplenishmentMethod.None);
            }
            if (r.ReplenishmentSource != INReplenishmentSource.PurchaseToOrder && r.ReplenishmentSource != INReplenishmentSource.DropShipToOrder && r.ReplenishmentSource != INReplenishmentSource.Transfer)
            {
                sender.SetDefaultExt <INItemClassRep.replenishmentSourceSiteID>(r);
            }
            sender.SetDefaultExt <INItemClassRep.transferLeadTime>(e.Row);
        }
Пример #3
0
        protected virtual void INItemClassRep_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            INItemClassRep row = (INItemClassRep)e.Row;

            if (row != null)
            {
                bool isTransfer     = (row.ReplenishmentSource == INReplenishmentSource.Transfer);
                bool isFixedReorder = (row.ReplenishmentMethod == INReplenishmentMethod.FixedReorder);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.replenishmentMethod>(sender, row, row.ReplenishmentSource != INReplenishmentSource.PurchaseToOrder && row.ReplenishmentSource != INReplenishmentSource.DropShipToOrder);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.replenishmentSourceSiteID>(sender, row, row.ReplenishmentSource == INReplenishmentSource.PurchaseToOrder || row.ReplenishmentSource == INReplenishmentSource.DropShipToOrder || row.ReplenishmentSource == INReplenishmentSource.Transfer || row.ReplenishmentSource == INReplenishmentSource.Purchased);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.transferLeadTime>(sender, e.Row, isTransfer);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.transferERQ>(sender, e.Row, isTransfer && isFixedReorder && row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.forecastModelType>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.forecastPeriodType>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.historyDepth>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.launchDate>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.terminationDate>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXUIFieldAttribute.SetEnabled <INItemClassRep.serviceLevelPct>(sender, e.Row, row.ReplenishmentMethod != INReplenishmentMethod.None);
                PXDefaultAttribute.SetPersistingCheck <INItemClassRep.transferLeadTime>(sender, e.Row, isTransfer ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
                PXDefaultAttribute.SetPersistingCheck <INItemClassRep.transferERQ>(sender, e.Row, (isTransfer && isFixedReorder) ? PXPersistingCheck.Null : PXPersistingCheck.Nothing);
            }
        }