Пример #1
0
 public string Del(string code)
 {
     try
     {
         if (SqlToNull.CheckBadWord(code))
         {
             code = SqlToNull.Filter(code);
         }
         if (UserManager.IsContainUserRoleInfoCode(GetCookie.GetUserCookie().userCode, code, byte.Parse(GetCookie.GetUserCookie().userType)))
         {
             return("该角色下有用户正在使用,删除失败!");
         }
         else
         {
             Role.delOaRoleByRoleCode(code);
             EastElite.SMS.Business.RoleInfo RoleIN = UserManager.GetRoleInfoItem(code);
             UserManager.DeleteRoleInfoItem(code);
             BLL.Log.UserLog.AddUserLog("删除角色成功", GetCookie.GetUserCookie().userName + " 删除修改 " + RoleIN.name + " 角色 ");
             return("删除成功");
         }
     }
     catch (Exception ex)
     {
         BLL.Log.UserLog.AddUserLog("删除角色失败", ex.Message);
         throw;
     }
 }
Пример #2
0
        public void Del(string code)
        {
            try
            {
                if (SqlToNull.CheckBadWord(code))
                {
                    code = SqlToNull.Filter(code);
                }
                Role.delOaRoleByRoleCode(code);
                EastElite.SMS.Business.RoleInfo RoleIN = UserManager.GetRoleInfoItem(code);
                UserManager.DeleteRoleInfoItem(code);

                BLL.Log.UserLog.AddUserLog("删除角色成功", GetCookie.GetUserCookie().userName + " 删除修改 " + RoleIN.name + " 角色 ");
            }
            catch (Exception ex)
            {
                BLL.Log.UserLog.AddUserLog("删除角色失败", ex.Message);
                throw;
            }
        }