Beispiel #1
0
        public IActionResult UpdateRoom(int roomId, int roomStyleId, int roomSizeId)
        {
            var room = RoomsDAO.UpdateRoom(new Room()
            {
                RoomID     = roomId,
                Status     = RoomsDAO.GetRoom(roomId).Status,
                RoomTypeID = RoomTypeDAO.GetRoomTypeBySizeAndStyle(roomStyleId, roomSizeId).RoomTypeID
            });

            return(Json(roomId));
        }
Beispiel #2
0
 public IActionResult CreateRoom(int roomId, int roomStyleId, int roomSizeId)
 {
     if (!RoomsDAO.CheckIsExistRoomById(roomId))
     {
         var room = RoomsDAO.InsertRoom(new Room()
         {
             RoomID     = roomId,
             Status     = RoomStatuses.Empty,
             RoomTypeID = RoomTypeDAO.GetRoomTypeBySizeAndStyle(roomStyleId, roomSizeId).RoomTypeID
         });
         return(Json(roomId));
     }
     else
     {
         return(Json(null));
     }
 }