public IActionResult Details(int Id)
        {
            var exhibition = _repo.GetExhibition(Id);

            if (exhibition != null)
            {
                return(View(exhibition.ToViewModel()));
            }

            return(NotFound());
        }
        public IActionResult Details(int Id)
        {
            var exhibition = _repo.GetExhibition(Id);

            if (exhibition != null)
            {
                //generate embed url
                var host = HttpContext.Request.Host;
                var url  = "http://" + host + "/?Id=" + exhibition.Id
                           + "&exhibitionName=" + exhibition.Name.Replace("+", "%2b")
                           + "&spexText=";
                exhibition.WebUrl = url;

                return(View(exhibition.ToViewModel()));
            }

            return(NotFound());
        }
예제 #3
0
        public IActionResult Create(int Id)
        {
            var exhibition = _repo.GetExhibition(Id);

            var viewModel = new BannerEditViewModel();

            viewModel.ExhibitionId   = exhibition.Id;
            viewModel.ExhibitionName = exhibition.Name;
            return(View(viewModel));
        }
예제 #4
0
        public IActionResult Index(int Id, string exhibitionName, string spexText)
        {
            var exhibition = _repository.GetExhibition(Id);

            if (exhibition == null || !exhibition.Name.Equals(exhibitionName))
            {
                return(NotFound());
            }

            return(View(exhibition.ToViewModel(spexText)));
        }