public ActionResult DeletePage(int Id)
        {
            var pagefound = _pagesService.GetPage(Id);

            _pagesService.DeletePage(pagefound.Id);

            return(this.RedirectToAction <PagesController>(c => c.Index()));;
        }
Esempio n. 2
0
        public IHttpActionResult DeleteItem(string storeId, [FromUri] string[] pageNamesAndLanguges)
        {
            base.CheckCurrentUserHasPermissionForObjects(ContentPredefinedPermissions.Delete, new ContentScopeObject {
                StoreId = storeId
            });

            _pagesService.DeletePage(storeId, PagesUtility.GetShortPageInfoFromString(pageNamesAndLanguges).ToArray());
            return(StatusCode(HttpStatusCode.NoContent));
        }
Esempio n. 3
0
        public IActionResult DeletePage(int pageId)
        {
            string pageName = pageService.GetPageNameById(pageId);

            pageService.DeletePage(pageId);

            string content = string.Format("{0} requested deletion of page: {1}", GetCurrentUserName(User.GetUserId()), pageName);

            logsService.AddNewLog("Delete", content);

            return(RedirectToAction("EditStaticPages"));
        }
Esempio n. 4
0
 public IHttpActionResult DeleteItem(string storeId, [FromUri] string[] pageNamesAndLanguges)
 {
     _pagesService.DeletePage(storeId, PagesUtility.GetShortPageInfoFromString(pageNamesAndLanguges).ToArray());
     return(Ok());
 }