public ActionResult Delete(int id)
        {
            var gallery = _galleryService.GetGalleryById(id);

            if (gallery == null)
            {
                //No gallery found with the specified id
                return(RedirectToAction("List"));
            }

            _galleryService.DeleteGallery(gallery);

            SuccessNotification(_localizationService.GetResource("Plugin.Widgets.Gallery.GalleryConfigureController.Deleted"));
            return(RedirectToAction("List"));
        }
示例#2
0
 public ActionResult Delete(long id)
 {
     galleryService.DeleteGallery(id);
     galleryService.SaveGallery();
     return(RedirectToAction("Index"));
 }