/// <summary> /// 按角色获取用户列表 /// </summary> /// <param name="userInfo">用户</param> /// <returns>数据权限</returns> public DataTable GetDTByRole(UserInfo userInfo, string roleId) { var dataTable = new DataTable(PiStaffTable.TableName); var parameter = ParameterUtil.CreateWithMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName, RDIFrameworkMessage.UserService_GetDTByRole); ServiceUtil.ProcessRDIReadDb(userInfo, parameter, dbProvider => { var userManager = new PiUserManager(dbProvider, userInfo); dataTable = userManager.GetDTByRole(roleId); dataTable.TableName = PiUserTable.TableName; }); return(dataTable); }