/// <summary> /// 按角色获取用户 /// </summary> /// <param name="userInfo">用户</param> /// <param name="roleIds">角色主键</param> /// <returns>数据表</returns> public DataTable GetDataTableByRole(BaseUserInfo userInfo, string[] roleIds) { var dt = new DataTable(BaseRoleEntity.TableName); var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod()); ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) => { var manager = new BaseOrganizeManager(dbHelper, userInfo); dt = manager.GetDataTableByRole(userInfo.SystemCode, roleIds); dt.TableName = BaseOrganizeEntity.TableName; dt.DefaultView.Sort = BaseOrganizeEntity.FieldSortCode; }); return(dt); }