Esempio n. 1
0
        private void loadReport(IThreadSafeWorkspace workspace, DateTimeOffset startDate, DateTimeOffset endDate, ReportsSource source)
        {
            if (this.startDate == startDate && this.endDate == endDate && workspaceId == workspace.Id)
            {
                return;
            }

            workspaceId    = workspace.Id;
            this.workspace = workspace;
            this.startDate = startDate;
            this.endDate   = endDate;
            this.source    = source;

            workspaceSubject.OnNext(workspace);
            startDateSubject.OnNext(startDate);
            endDateSubject.OnNext(endDate);

            updateCurrentDateRangeString();

            reportSubject.OnNext(Unit.Default);
        }
Esempio n. 2
0
 public ReportsDateRangeParameter WithSource(ReportsSource source)
 {
     return(new ReportsDateRangeParameter {
         StartDate = this.StartDate, EndDate = this.EndDate, Source = source
     });
 }
Esempio n. 3
0
        public async Task LoadReport(long?workspaceId, DateTimeOffset startDate, DateTimeOffset endDate, ReportsSource source)
        {
            var getWorkspaceInteractor = workspaceId.HasValue
                ? interactorFactory.GetWorkspaceById(this.workspaceId)
                : interactorFactory.GetDefaultWorkspace();

            var workspace = await getWorkspaceInteractor.Execute();

            loadReport(workspace, startDate, endDate, source);
        }