Exemple #1
0
 public BookedRoomEntity(Booking booking, Room room)
 {
     _room = room;
     _appliedPackEntities = new List<AppliedPackEntity>();
     foreach(AppliedPack appliedPack in booking.RoomPacks)
     {
         if(appliedPack.Room.Id == _room.Id)
         {
             _appliedPackEntities.Add(new AppliedPackEntity(appliedPack));
         }
     }
 }
Exemple #2
0
 public RoomEntity(Room room)
 {
     _pcs = new PropertyChangeSupport(this);
     _room = room;
 }
Exemple #3
0
 private static async Task<Room> _getReplacementRoom(ResotelContext ctx, Room unavailableRoom)
 {
     return await _getRoomRequest(ctx, false)
                                         .FirstOrDefaultAsync(room => room.Kind == unavailableRoom.Kind);
 }
Exemple #4
0
 private static void _replaceRoom(Booking booking, Room unavailableRoom, Room replacementRoom)
 {
     booking.Rooms.Add(replacementRoom);
     booking.Rooms.Remove(unavailableRoom);
 }