Ejemplo n.º 1
0
        // GET: RoomTypes/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var roomType = await _roomTypeService.GetItemByIdAsync(id);

            if (roomType == null)
            {
                return(NotFound());
            }
            return(View(roomType));
        }
        // GET: Features/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var feature = await _hotelService.GetItemByIdAsync(id);

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


            return(View(feature));
        }
Ejemplo n.º 3
0
        // GET: Rooms/Edit/5
        public async Task <IActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var room = await _hotelService.GetItemByIdAsync(id);

            if (room == null)
            {
                return(NotFound());
            }
            var RoomTypes = _hotelService.GetAllRoomTypesAsync().Result;

            ViewData["RoomTypeID"] = new SelectList(RoomTypes, "ID", "Name", room.RoomType.ID);

            return(View(room));
        }
Ejemplo n.º 4
0
        // GET: Rooms/Details/5
        public async Task <IActionResult> Details(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var room = await _hotelService.GetItemByIdAsync(id);

            var hbv = room.Features;


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

            return(View(room));
        }
Ejemplo n.º 5
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));
        }
        // GET: Rooms/Edit/5
        public async Task <IActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var room = await _hotelService.GetItemByIdAsync(id);

            if (room == null)
            {
                return(NotFound());
            }
            var RoomTypes = _hotelService.GetAllRoomTypesAsync().Result;

            ViewData["RoomTypeID"] = new SelectList(RoomTypes, "ID", "Name", room.RoomType.ID);

            ViewData["Features"] = _hotelService.PopulateSelectedFeaturesForRoom(room);
            var ImagesAndFeatures = await _hotelService.GetRoomFeaturesAndImagesAsync(room);

            ViewData["Images"] = ImagesAndFeatures.Images;
            return(View(room));
        }