// GET: Rooms/Create public ActionResult Create() { var userName = User.Identity.GetUserName(); ViewBag.roomtypeId = new SelectList(_roomTypeService.GetRoomTypes(), "roomtypeId", "Type"); ViewBag.BuildingId = new SelectList(_buildingService.GetBuildings().Where(x => x.OwnerEmail == userName), "BuildingId", "BuildingName"); return(View()); }
public ActionResult AddRoom() { var typeMsg = ""; var blockMsg = ""; var types = _roomTypeService.GetRoomTypes(); var hotelBlocks = _hotelBlockService.GetAll(); typeMsg = !types.Any() ? "يجب إضافة نوع غرفة" :""; blockMsg = !hotelBlocks.Any() ? "يجب إضافة كتلة بنائية " : ""; ViewBag.blockMsg = blockMsg; ViewBag.typeMsg = typeMsg; return(View()); }
public bool ChceckPoeple(int roomTypeId, int numberOfPeopl) { var recuredNumber = (from rt in _roomTypeService.GetRoomTypes() where rt.roomtypeId == roomTypeId select rt.NumOfRooms).FirstOrDefault(); if (recuredNumber >= numberOfPeopl) { return(true); } else { return(false); } }
public List <C_RoomType> GetRoomTypes() { if (_cachedRoomTypes != null) { return(_cachedRoomTypes); } return(_cachedRoomTypes = _roomTypeService.GetRoomTypes()); }
public IActionResult Index() { var roomTypes = IRoomTypeService.GetRoomTypes().ToList(); return(View(roomTypes)); }
public ActionResult getall() { return(View(_roomTypeService.GetRoomTypes())); }
// GET: RoomType public ActionResult Index() { return(View(_roomTypeService.GetRoomTypes())); }
public async Task <IActionResult> Get() { return(Ok(await _roomTypeService.GetRoomTypes())); }