Exemplo n.º 1
0
        public virtual ActionResult Delete(int id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageIdea))
            {
                return(AccessDeniedView());
            }

            var idea = _ideaService.GetIdeaById(id);

            if (idea == null)
            {
                return(RedirectToAction("List"));
            }

            _ideaService.DeleteIdea(idea);

            //activity log
            _customerActivityService.InsertActivity("DeleteIdea", _localizationService.GetResource("ActivityLog.DeleteIdea"), idea.Id);

            SuccessNotification(_localizationService.GetResource("Admin.ContentManagement.Idea.Deleted"));

            return(View());
        }