/// <summary> /// /// </summary> public override void afterPropertySetPopulateProps() { Quantity.SetOnPropChange(onQuantityPropChange); TotalDispensed.SetOnPropChange(onTotalDispensedPropChange); Material.SetOnPropChange(onMaterialPropChange); TotalMoved.SetOnPropChange(onTotalMovedPropChange); IsFavorite.SetOnPropChange(onIsFavoritePropChange); IsRecurring.SetOnPropChange(onIsRecurringChange); RecurringFrequency.SetOnPropChange(onRecurringFrequencyPropChange); }//afterPopulateProps()
/// <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; } } }