Пример #1
0
        public ActionResult Delete(int id, int sectionId, FormCollection collection)
        {
            var sectionItems = _sectionItemService.GetBySliderImage(id);

            foreach (var item in sectionItems)
            {
                _sectionItemService.Delete(item.Id);
            }
            _sliderImageService.Delete(id);

            return(Redirect("/Admin/SectionItem/AddSliderImage?sectionId=" + sectionId).WithSuccess("Imágen Eliminada"));
        }
Пример #2
0
        public ActionResult Delete(int sectionItemId, int sectionId, FormCollection collection)
        {
            _sectionItemService.Delete(sectionItemId);

            return(RedirectToAction("Index", new { sectionId = sectionId }).WithSuccess("Item Eliminado"));
        }