Пример #1
0
        public IActionResult ShowCExhibition(int eId, int ceId)
        {
            SingleExh model = new SingleExh(exhibitionService.GetExhById(eId), currentExhibitionService.GetCurExhById(ceId),
                                            currentExhibitionService.GetAllPicsFromExhibition(ceId), hRService.GetPlaceById(currentExhibitionService.GetCurExhById(ceId).IdExhPlace)
                                            , hRService.GetCityById(hRService.GetPlaceById(currentExhibitionService.GetCurExhById(ceId).IdExhPlace).IdCity));

            return(View(model));
        }
Пример #2
0
        public IActionResult Cart()
        {
            var ticketsFromCE = _ticketService.GetAllTicketsFromCart(GetCartId().Result);

            foreach (TicketInCartModel t in ticketsFromCE)
            {
                t.CurrentExhibition            = _currExhService.GetCurExhById((int)t.CurExhId);
                t.CurrentExhibition.Exhibition = _exhService.GetExhById(t.CurrentExhibition.IdExh);
            }
            CartModel model = new CartModel(ticketsFromCE);

            return(View(model));
        }
Пример #3
0
        // GET: ExhibitedPictures
        public async Task <IActionResult> Index()
        {
            var list = currentExhibitionService.GetAllExhPics().ToList();

            foreach (ExhibitedPictureModel c in list)
            {
                c.CurrentExhibition            = currentExhibitionService.GetCurExhById(c.IdCurrExh);
                c.CurrentExhibition.Exhibition = exhibitionService.GetExhById(c.CurrentExhibition.IdExh);
                c.Picture = pictureService.GetPicById(c.IdPicture);
            }
            ExhPicModel model = new ExhPicModel(list);

            return(View(model));
        }