public EmptyTakeRateDocument() { UnderlyingOxoDocument = new EmptyOxoDocument(); Vehicle = new EmptyVehicle(); Market = new EmptyMarket(); MarketGroup = new EmptyMarketGroup(); }
public TakeRateDocument() { UnderlyingOxoDocument = new EmptyOxoDocument(); MarketGroup = new EmptyMarketGroup(); Market = new EmptyMarket(); Vehicle = new EmptyVehicle(); TakeRateData = new EmptyTakeRateData(); Mode = TakeRateResultMode.PercentageTakeRate; TakeRateSummary = new List<TakeRateSummary>(); }
public async Task<OXODoc> GetUnderlyingOxoDocument(TakeRateFilter filter) { OXODoc document = new EmptyOxoDocument(); if (!filter.DocumentId.HasValue) { var summary = _takeRateDataStore.FdpTakeRateHeaderGet(filter); document = _documentDataStore.OXODocGet(summary.OxoDocId, filter.ProgrammeId.GetValueOrDefault()); } else { document = _documentDataStore.OXODocGet(filter.DocumentId.Value, filter.ProgrammeId.GetValueOrDefault()); } return await Task.FromResult(document); }
private static async Task<OXODoc> HydrateOxoDocument(IDataContext context, TakeRateViewModel volumeModel) { var watch = Stopwatch.StartNew(); OXODoc retVal = new EmptyOxoDocument(); if (!(volumeModel.Document.UnderlyingOxoDocument is EmptyOxoDocument)) { volumeModel.Document.UnderlyingOxoDocument = await GetOxoDocument(context, volumeModel.Document.UnderlyingOxoDocument); } else { volumeModel.Document.UnderlyingOxoDocument = await GetOxoDocumentFromTakeRateFile(context, volumeModel.Document); } volumeModel.Document.Vehicle.ProgrammeId = volumeModel.Document.UnderlyingOxoDocument.ProgrammeId; volumeModel.Document.Vehicle.Gateway = volumeModel.Document.UnderlyingOxoDocument.Gateway; retVal = volumeModel.Document.UnderlyingOxoDocument; watch.Stop(); Log.Debug(watch.ElapsedMilliseconds); return retVal; }