public void ValidateNewStatus(RequestItemStatus newStatus) { if (newStatus.Value < this.Value) { new InvalidStatusException("The status must be greater than the current one."); } }
public void SetItemStatus(int itemId, RequestItemStatus newStatus) { foreach (RequestItem item in Items) { if (item.Id == itemId) { item.SetStatus(newStatus); } } }
public void SetStatus(RequestItemStatus newStatus) { this.Status.ValidateNewStatus(newStatus); this.Status = newStatus; }