示例#1
0
 /// <summary>
 /// 插入数据
 /// </summary>
 /// <param name="role">数据实体</param>
 public void Insert(RoleUserEntity role)
 {
     if (role.UserId == 0)
     {
         throw new BusinessException("用户Id不允许为空");
     }
     if (role.RoleId == 0)
     {
         throw new BusinessException("角色Id不允许为空");
     }
     RoleUserDA.Insert(role);
 }
示例#2
0
 /// <summary>
 /// 根据角色ID删除关联关系
 /// </summary>
 /// <param name="role">数据实体</param>
 public void DeleteByRoleId(RoleUserEntity role)
 {
     RoleUserDA.DeleteByRoleId(role);
 }
示例#3
0
 /// <summary>
 /// 查询用户是否存在关联角色
 /// </summary>
 public bool HasExistUserRoleAssociation(int roleId)
 {
     return(RoleUserDA.HasExistUserRoleAssociation(roleId));
 }