Esempio n. 1
0
        public ActionResult Edit(int id, SliderImageForm sliderImageForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(sliderImageForm));
            }

            _sliderImageService.Edit(sliderImageForm.ToSliderImage());

            return(Redirect("/Admin/SectionItem/AddSliderImage?sectionId=" + sliderImageForm.SectionId).WithSuccess("Imágen Editada"));
        }
Esempio n. 2
0
        public ActionResult Create(SliderImageForm sliderImageForm)
        {
            if (!ModelState.IsValid)
            {
                return(View(sliderImageForm));
            }

            var sliderImage = sliderImageForm.ToSliderImage();

            _sliderImageService.Create(sliderImage);

            return(RedirectToAction("AddSliderImage", "SectionItem", new { @sectionId = sliderImageForm.SectionId }).WithSuccess("Imágen Creada"));
        }