Example #1
0
        public async Task <ActionResult <SlideShowViewModel> > Update(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            SlideShowViewModel existSlideShow = _iMapper.Map <SlideShowViewModel>
                                                    (await _iSlideShowManager.GetById(id));

            if (existSlideShow == null)
            {
                return(NotFound());
            }
            return(View(existSlideShow));
        }
Example #2
0
        public IActionResult Edit(int?id)
        {
            if (HttpContext.Session.GetString("AdminId") != null)
            {
                if (id == null)
                {
                    return(NotFound());
                }

                SlideShow aSlideShowInfo = _iSlideShowManager.GetById(id);

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

                return(View(aSlideShowInfo));
            }

            return(RedirectToAction("Index", "Login"));
        }