Пример #1
0
 public IActionResult CheckRoomTypeExists(int roomStyleId, int roomSizeId)
 {
     if (RoomTypeDAO.CheckIsExistRoomTypeByStyleIdAndSizeId(roomStyleId, roomSizeId))
     {
         return(Json(true));
     }
     else
     {
         return(Json(false));
     }
 }
Пример #2
0
 public IActionResult CreateRoomType(int roomStyleId, int roomSizeId, int price, string description)
 {
     if (!RoomTypeDAO.CheckIsExistRoomTypeByStyleIdAndSizeId(roomStyleId, roomSizeId))
     {
         RoomTypeDAO.InsertRoomType(roomStyleId, roomSizeId, price, description);
         return(Json(price));
     }
     else
     {
         RoomTypeDAO.UpdateRoomType(roomStyleId, roomSizeId, price, description);
         return(Json(price));
     }
 }