コード例 #1
0
 /// <summary>
 /// Request-specific Status property change events
 /// </summary>
 public override void onStatusPropChange(CswNbtNodeProp Prop)
 {
     TotalDispensed.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true);
     Size.setHidden(value: true, SaveToDb: true);
     switch (Status.Value)
     {
     case Statuses.Dispensed:
         if (TotalDispensed.Quantity >= Quantity.Quantity)
         {
             Fulfill.State = FulfillMenu.Complete;
         }
         break;
     }
 }
コード例 #2
0
        private void _toggleRequestItemPropVisibility()
        {
            bool HideTheseProperties = (_IsFavorite || _IsRecurring);

            Status.setHidden(value: HideTheseProperties, SaveToDb: true);
            Fulfill.setHidden(value: HideTheseProperties, SaveToDb: true);
            AssignedTo.setHidden(value: HideTheseProperties, SaveToDb: true);
            Number.setHidden(value: HideTheseProperties, SaveToDb: true);
            NeededBy.setHidden(value: HideTheseProperties, SaveToDb: true);
            TotalMoved.setHidden(value: HideTheseProperties, SaveToDb: true);
            TotalDispensed.setHidden(value: HideTheseProperties, SaveToDb: true);
            ReceiptLotToDispense.setHidden(value: HideTheseProperties, SaveToDb: true);
            ReceiptLotsReceived.setHidden(value: HideTheseProperties, SaveToDb: true);
            GoodsReceived.setHidden(value: HideTheseProperties, SaveToDb: true);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        public override void onStatusPropChange(CswNbtNodeProp Prop)
        {
            if (Status.WasModified && Status.Value != NonRequestableStatus)
            {
                if (Status.Value == Statuses.Pending)
                {
                    TotalDispensed.setHidden(value: true, SaveToDb: true);
                    TotalMoved.setHidden(value: true, SaveToDb: true);
                    Type.setHidden(value: true, SaveToDb: true);
                    Quantity.setReadOnly(value: false, SaveToDb: true);
                    Size.setReadOnly(value: false, SaveToDb: true);
                    Count.setReadOnly(value: false, SaveToDb: true);

                    //MLM
                    if (_CswNbtResources.Modules.IsModuleEnabled(CswEnumNbtModuleName.MLM))
                    {
                        foreach (string PropName in PropertyName.MLMCmgTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: true, SaveToDb: true);
                        }
                        foreach (string PropName in PropertyName.MLMReceiveTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: true, SaveToDb: true);
                        }
                    }
                }
                else
                {
                    if (Type.Value == Types.Size)
                    {
                        TotalDispensed.setHidden(value: true, SaveToDb: true);
                        TotalMoved.setHidden(value: false, SaveToDb: true);
                    }
                    else
                    {
                        TotalDispensed.setHidden(value: false, SaveToDb: true);
                        TotalMoved.setHidden(value: true, SaveToDb: true);
                    }
                    Type.setHidden(value: false, SaveToDb: true);
                    Quantity.setReadOnly(value: true, SaveToDb: true);
                    Size.setReadOnly(value: true, SaveToDb: true);
                    Count.setReadOnly(value: true, SaveToDb: true);
                    //MLM
                    if (_CswNbtResources.Modules.IsModuleEnabled(CswEnumNbtModuleName.MLM))
                    {
                        IsRecurring.setHidden(value: false, SaveToDb: true);
                        foreach (string PropName in PropertyName.MLMCmgTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: false, SaveToDb: true);
                        }
                        foreach (string PropName in PropertyName.MLMReceiveTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: false, SaveToDb: true);
                        }
                    }
                }
                switch (Status.Value)
                {
                case Statuses.Received:
                    Fulfill.State = FulfillMenu.Dispense;
                    break;

                case Statuses.Dispensed:
                    if (TotalDispensed.Quantity >= Quantity.Quantity)
                    {
                        Fulfill.State = FulfillMenu.Complete;
                    }
                    break;

                case Statuses.Moved:
                    if (TotalMoved.Value >= Count.Value)
                    {
                        Fulfill.State = FulfillMenu.Complete;
                    }
                    break;

                case Statuses.Ordered:
                    Fulfill.State = FulfillMenu.Receive;
                    break;
                }
            }
        }