public static ListOutputType1 ListAtTime(ListOejebliksbilledeInputType input, string appToken, string userToken, SourceUsageOrder sourceUsageOrder) { var facade = new ListPeriodLookupFacadeMethodInfo() { ApplicationToken = appToken, UserToken = userToken, Input = new PeriodLookupInput() { UUIDs = input.UUID, EffectDateFrom = input.VirkningDato, EffectDateTo = input.VirkningDato, SourceUsageOrder = sourceUsageOrder } }; ListOutputType1 result = GetMethodOutput <ListOutputType1, LaesResultatType[]>(facade); String[] emptyRecords = ValidateResults(result.LaesResultat); if (emptyRecords.Length == 0) { result.StandardRetur = StandardReturType.OK(); } else { result.StandardRetur = StandardReturType.NoContent(emptyRecords); } return(result); }
public static ListOutputType1 ListPeriod(ListPeriodInputType input, string appToken, string userToken, SourceUsageOrder sourceUsageOrder) { var facade = new ListPeriodLookupFacadeMethodInfo() { ApplicationToken = appToken, UserToken = userToken, Input = new PeriodLookupInput() { UUIDs = input.UUID, EffectDateFrom = input.VirkningFraDato, EffectDateTo = input.VirkningTilDato, SourceUsageOrder = sourceUsageOrder } }; ListOutputType1 result = GetMethodOutput <ListOutputType1, LaesResultatType[]>(facade); string[] emptyRecords = ValidateResults(result.LaesResultat); CprBroker.Engine.Local.Admin.LogFormattedSuccess("# of empty records: {0}", emptyRecords.Length); if (emptyRecords.Length == 0) { result.StandardRetur = StandardReturType.OK(); } else { result.StandardRetur = StandardReturType.NoContent(emptyRecords); } return(result); }
public static LaesOutputType ReadPeriod(LaesPeriodInputType input, string appToken, string userToken, SourceUsageOrder sourceUsageOrder) { var facade = new ReadPeriodLookupFacadeMethodInfo() { ApplicationToken = appToken, UserToken = userToken, Input = new PeriodLookupInput() { UUIDs = new string[] { input.UUID }, EffectDateFrom = input.VirkningFraDato, EffectDateTo = input.VirkningTilDato, SourceUsageOrder = sourceUsageOrder } }; LaesOutputType result = GetMethodOutput <LaesOutputType, LaesResultatType>(facade); if (IsValidateResult(result.LaesResultat)) { result.StandardRetur = StandardReturType.OK(); } else { result.StandardRetur = StandardReturType.NoContent(new string[] { ((FiltreretOejebliksbilledeType)result.LaesResultat.Item).UUID }); } return(result); }