Example #1
0
        public ActionResult Add()
        {
            var vm = new SlideVM();

            vm.WebSite = CurrentWebsite;

            return(View(vm));
        }
Example #2
0
 public ActionResult Edit(SlideVM vm)
 {
     if (ModelState.IsValid)
     {
         Mapper.Initialize(c => c.CreateMap <SlideVM, SlideDTO>());
         var slideDto        = Mapper.Map <SlideVM, SlideDTO>(vm);
         OperationDetails op = _sliderService.EditSlide(slideDto);
         return(Json(new { Succedeed = op.Succedeed, message = op.Message }));
     }
     return(View(vm));
 }