public Guest AddGuestToRoom(ReservationRoom reservationRoom, string name, bool isChild, bool isNewlyweds, bool orderedBreakfest, decimal priceForStay) { ReservationValidators.ValidIfReservationRoomExistInReservation(this, reservationRoom); return(reservationRoom.AddGuest(name, isChild, isNewlyweds, orderedBreakfest, priceForStay)); }
public ReservationRoom UpdateRoom(ReservationRoom updatedReservationRoom) { ReservationValidators.ValidIfReservationRoomExistInReservation(this, updatedReservationRoom); var reservationRoom = ReservationRooms.FirstOrDefault(x => x.Id == updatedReservationRoom.Id); return(reservationRoom.Update(updatedReservationRoom)); }
public static Reservation Create(Customer customer, DateTime checkIn, DateTime checkOut) { if (customer == null) { throw new MissingValueException("Klient nie został określony."); } ReservationValidators.ValidDates(checkIn, checkOut); return(new Reservation { Customer = customer, CheckIn = checkIn, CheckOut = checkOut }); }
public void ChangeCheckOut(DateTime checkOut) { ReservationValidators.ValidDates(CheckIn, checkOut); CheckOut = checkOut; }
public void ChangeCheckIn(DateTime checkIn) { ReservationValidators.ValidDates(checkIn, CheckOut); CheckIn = checkIn; }
public void RemoveGuestFromRoom(ReservationRoom reservationRoom, Guest guest) { ReservationValidators.ValidIfReservationRoomExistInReservation(this, reservationRoom); reservationRoom.RemoveGuest(guest); }