/// <summary> /// 修改角色 /// </summary> public bool EditRole(RoleEntity role, string originalRoleName) { if (role.RoleName != originalRoleName && dal.GetRoleByRoleName(role.RoleName) != null) { throw new Exception("已经存在此角色!"); } return(dal.EditRole(role)); }