Exemple #1
0
        public IActionResult Delete(int id)
        {
            if (_siteMapRepository.Delete(id))
            {
                TempData[notificationMessageKey] = "Element has been deleted successfully. </br> It will take effect after admin approval.";
                TempData[notificationTypeKey]    = notificationSuccess;
                _eventLogger.LogInfoEvent(HttpContext.User.Identity.Name, Common.ActivityEnum.Delete, "Definitions > Page SiteMap Details > Delete", "Delete Id: " + id);
                return(Json(new { }));
            }

            TempData[notificationMessageKey] = "Error has been occurred.";
            TempData[notificationTypeKey]    = notificationError;
            _eventLogger.LogInfoEvent(HttpContext.User.Identity.Name, Common.ActivityEnum.Warning, "Definitions > Page SiteMap Details > Delete", "Delete Id: " + id);
            return(Json(new { }));
        }
Exemple #2
0
 public SiteMap Delete(int _id)
 {
     return(_Repository.Delete(_id));
 }