Esempio n. 1
0
 public async Task <Models.Project> Get(string id)
 => await _projects.Find(x => x.Id == id)
 .Project(x => new Models.Project
 {
     Name     = x.Name,
     Id       = x.Id,
     Releases = x.Releases.Select(y => new ReleaseSummary
     {
         Id   = y.Id,
         Date = y.Date,
         href = ReleaseSummary.GenerateHref(x.Id, y.Id)
     })
                .ToList()
 })
 .FirstOrDefaultAsync();
Esempio n. 2
0
        public void Display(RetentionReleaseEstimateReport report)
        {
            ViewState.Add("RetentionReleaseEstimateReport", report);

            if (report != null)
            {
                RetentionReleaseEstimateReport retentionReleaseEstimateReport = report;

                CffGGV_ReportGridView.DataSource = retentionReleaseEstimateReport.Records;
                CffGGV_ReportGridView.DataBind();

                ReleaseSummary releases = retentionReleaseEstimateReport.ReleaseSummary;
                FundedTransactionReleaseLiteral.Text    = releases.FundedTransactionRelease.ToString("C");
                NonFundedTransactionReleaseLiteral.Text = releases.NonFundedTransactionRelease.ToString("C");
                ReleaseTotal.Text = releases.Total.ToString("C");

                Deductables deductables = retentionReleaseEstimateReport.Deductables;
                UnclaimedCreditsLiteral.Text     = deductables.UnclaimedCredits.ToString("C");
                UnclaimedRepurchasesLiteral.Text = deductables.UnclaimedRepurchases.ToString("C");
                UnclaimedDiscountsLiteral.Text   = deductables.UnclaimedDiscounts.ToString("C");
                LikelyRepurchasesLiteral.Text    = deductables.LikelyRepurchases.ToString("C");
                OverdueChargesLiteral.Text       = deductables.OverdueCharges.ToString("C");

                Fee chequeFee = deductables.ChequeFee;
                ChequeFeeLiteral.Text       = chequeFee.Rate.ToString("C");
                NumberOfChequesLiteral.Text = chequeFee.Count.ToString();
                ChequeFeesLiteral.Text      = chequeFee.Total.ToString("C");

                Fee postage = deductables.Postage;
                PostageFeeLiteral.Text    = postage.Rate.ToString("C");
                NumberOfPostsLiteral.Text = postage.Count.ToString();
                PostageFeesLiteral.Text   = postage.Total.ToString("C");

                Fee letterFee = deductables.LetterFees;
                LetterFeeLiteral.Text       = letterFee.Rate.ToString("C");
                NumberOfLettersLiteral.Text = letterFee.Count.ToString();
                LetterFeesLiteral.Text      = letterFee.Total.ToString("C");

                DeductablesTotalLiteral.Text = deductables.Total.ToString("C");

                EstimatedReleaseLiteral.Text = retentionReleaseEstimateReport.EstimatedRelease.ToString("C");
                DateViewedLiteral.Text       = retentionReleaseEstimateReport.DateViewed.ToDateTimeString();
            }
        }
Esempio n. 3
0
 public async Task <IEnumerable <ProjectSummary> > List()
 => await(_projects
          .Find(FilterDefinition <Entities.Project> .Empty)
          .SortBy(x => x.Name)
          .Project(x => new ProjectSummary
 {
     Name          = x.Name,
     Id            = x.Id,
     ReleaseCount  = x.Releases.Count,
     LatestRelease = x.Releases
                     .OrderByDescending(y => y.Date)
                     .Select(y => new ReleaseSummary
     {
         Id   = y.Id,
         Date = y.Date,
         href = ReleaseSummary.GenerateHref(x.Id, y.Id)
     })
                     .FirstOrDefault()
 }))
 .ToListAsync();