public void Cancel() { IsCancelledOrArchived(); IsNotScheduled(); foreach (var bookedSlot in _slots.GetBookedSlots()) { Raise(new SlotBookingCancelled(Id, bookedSlot.Id, null)); } var events = _slots .All() .Select(slot => new SlotScheduleCancelled(Id, slot.Id)) .ToList(); events.ForEach(Raise); Raise(new DayScheduleCancelled(Id)); }
public void ToggleSlotSelection(int slotUid) { foreach (Slot s in Slots) { if (s.UID != slotUid) { continue; } s.IsSelected = !s.IsSelected; } IsAllSlotsSelected = Slots.All(x => x.IsSelected); SlotSelectionChanged?.Invoke(this, null); }
/// <summary> /// Check if grid is full /// </summary> private void CheckIsFull() { IsFull.Value = Slots.All(s => !s.IsFree); }
public bool ValidateSlots() { return(SlotCapacity == Slots.Count && Slots.All(x => x.Products.Count > 0)); }