Esempio n. 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));
         }
     }
 }
Esempio n. 2
0
 public RoomEntity(Room room)
 {
     _pcs = new PropertyChangeSupport(this);
     _room = room;
 }
Esempio n. 3
0
 private static async Task<Room> _getReplacementRoom(ResotelContext ctx, Room unavailableRoom)
 {
     return await _getRoomRequest(ctx, false)
                                         .FirstOrDefaultAsync(room => room.Kind == unavailableRoom.Kind);
 }
Esempio n. 4
0
 private static void _replaceRoom(Booking booking, Room unavailableRoom, Room replacementRoom)
 {
     booking.Rooms.Add(replacementRoom);
     booking.Rooms.Remove(unavailableRoom);
 }