public ActionResult DeletePage(int Id) { var pagefound = _pagesService.GetPage(Id); _pagesService.DeletePage(pagefound.Id); return(this.RedirectToAction <PagesController>(c => c.Index()));; }
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)); }
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")); }
public IHttpActionResult DeleteItem(string storeId, [FromUri] string[] pageNamesAndLanguges) { _pagesService.DeletePage(storeId, PagesUtility.GetShortPageInfoFromString(pageNamesAndLanguges).ToArray()); return(Ok()); }