예제 #1
0
        // GET: Rooms/Details/5
        public async Task <IActionResult> Details(string id)
        {
            var room = _RoomService.GetAllRooms().SingleOrDefault(x => x.ID == id);

            if (room == null)
            {
                return(NotFound());
            }

            var ImagesAndFeatures = await _RoomService.GetRoomFeaturesAndImagesAsync(room);

            ViewData["Features"] = ImagesAndFeatures.Features;
            ViewData["Images"]   = ImagesAndFeatures.Images;
            return(View(room));
        }
예제 #2
0
        // GET: Rooms/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var room = _hotelService.GetAllRooms().SingleOrDefault(x => x.ID == id);


            if (room == null)
            {
                return(NotFound());
            }

            return(View(room));
        }
예제 #3
0
        // GET: RoomTypes/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var roomType = await _hotelService.GetItemByIdAsync(id);


            if (roomType == null)
            {
                return(NotFound());
            }

            var rooms = _hotelService.GetAllRooms().Where(x => x.RoomTypeID == id);

            ViewData["CategoryRooms"] = rooms;
            return(View(roomType));
        }