private void _onStatusPropChange(CswNbtNodeProp Prop) { AssignedTo.setHidden(value: (Status.Value == Statuses.Pending || Status.Value == Statuses.Completed || Status.Value == Statuses.Cancelled), SaveToDb: true); Fulfill.setHidden(value: (Status.Value == Statuses.Pending || Status.Value == Statuses.Completed || Status.Value == Statuses.Cancelled), SaveToDb: true); //27800 - don't show redundant props when status is pending Request.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Name.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Requestor.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Status.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Priority.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); ExternalOrderNumber.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); Type.setHidden(value: (Status.Value == Statuses.Pending), SaveToDb: true); switch (Status.Value) { case Statuses.Submitted: toggleReadOnlyProps(true, this); break; case Statuses.Cancelled: //This fallthrough is intentional case Statuses.Completed: CswNbtObjClassRequest NodeAsRequest = _CswNbtResources.Nodes[Request.RelatedNodeId]; if (null != NodeAsRequest) { NodeAsRequest.setCompletedDate(); } _toggleReadOnlyProps(IsReadOnly: true, ItemInstance: this); Node.setReadOnly(value: true, SaveToDb: true); break; } onStatusPropChange(Prop); }
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); }