Beispiel #1
0
        public ActionResult Delete(int id)
        {
            if (!_permissionService.Authorize("ManageLogs"))
            {
                return(AccessDeniedView());
            }

            if (id == 0)
            {
                throw new Exception("Id Not Found");
            }

            var _logEntry = _systemLogService.GetSystemLogById(id);

            if (_logEntry != null)
            {
                _systemLogService.DeleteLog(_logEntry);
            }

            SuccessNotification("System Log Entry Deleted Successfully.");
            return(RedirectToAction("List"));
        }