public static EntityData GetAccessRangeByGroupRelation(string GroupCode, string AccessRangeType, string RelationCode) { EntityData data2; try { AccessRangeStrategyBuilder builder = new AccessRangeStrategyBuilder(); builder.AddStrategy(new Strategy(AccessRangeStrategyName.GroupCode, GroupCode)); ArrayList pas = new ArrayList(); pas.Add(AccessRangeType); pas.Add(RelationCode); builder.AddStrategy(new Strategy(AccessRangeStrategyName.AccessRelation0, pas)); builder.AddOrder("OperationCode", true); string queryString = builder.BuildQueryViewString(); QueryAgent agent = new QueryAgent(); EntityData data = agent.FillEntityData("AccessRange", queryString); agent.Dispose(); data2 = data; } catch (Exception exception) { throw exception; } return(data2); }
public static EntityData GetAccessRangeByResourceCode(string ResourceCode) { EntityData data2; try { AccessRangeStrategyBuilder builder = new AccessRangeStrategyBuilder(); builder.AddStrategy(new Strategy(AccessRangeStrategyName.ResourceCode, ResourceCode)); builder.AddOrder("OperationCode", true); string queryString = builder.BuildQueryViewString(); QueryAgent agent = new QueryAgent(); EntityData data = agent.FillEntityData("AccessRange", queryString); agent.Dispose(); data2 = data; } catch (Exception exception) { throw exception; } return(data2); }