Beispiel #1
0
        public ActionResult Delete(int id)
        {
            ShowResultModel srm = new ShowResultModel();

            try
            {
                _adminRoleService.DeleteRole(id);
                srm.IsSuccess   = true;
                srm.TipMsg      = "删除成功!";
                srm.ReDirectUrl = "GetRoleList";
            }
            catch (InvalidOperationException ex)
            {
                srm.TipMsg = ex.Message;
            }
            catch (Exception ex)
            {
                srm.TipMsg = ex.Message;
                LoggerHelper.Log("【管理员角色删除】出错,系统操作管理员:" + _currentAdmin.AdminInfo.SAName + ",错误原因:" + (ex.InnerException == null ? ex.Message : ex.InnerException.ToString()));
            }
            return(Json(srm));
        }