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)); }
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)); } }