コード例 #1
0
 public ActionResult <List <ReportingPeriod> > Get(
     FundingSource source
     )
 {
     return(_periods.GetReportingPeriodsByFundingSource(source));
 }
コード例 #2
0
 public FundingSourceFinancialTotalsDto(FundingSource fundingSource, IQueryable <ProjectFundingSourceBudget> projectFundingSourceBudgets, IQueryable <ProjectFundingSourceExpenditure> projectFundingSourceExpenditures)
 {
     ProjectFirmaFundingSourceID = fundingSource.FundingSourceID;
     BudgetSecuredTotal          = projectFundingSourceBudgets.Any(x => x.SecuredAmount != null) ? projectFundingSourceBudgets.Sum(x => x.SecuredAmount) : null;
     ExpendituresTotal           = projectFundingSourceExpenditures.Any() ? projectFundingSourceExpenditures.Sum(x => x.ExpenditureAmount) : (decimal?)null;
 }
コード例 #3
0
        private ActionResult UpdateFundingSourceCustomAttributes(EditFundingSourceCustomAttributesViewModel viewModel, FundingSource fundingSource)
        {
            viewModel.UpdateModel(fundingSource, CurrentFirmaSession);

            return(new ModalDialogFormJsonResult());
        }
コード例 #4
0
 public List <ReportingPeriod> GetReportingPeriodsByFundingSource(FundingSource source)
 {
     return(_context.ReportingPeriods
            .Where(period => period.Type == source)
            .ToList());
 }
 public void Delete(FundingSource entity)
 {
     Repository.Delete(entity);
 }
 public void Add(FundingSource entity)
 {
     Repository.Add(entity);
 }
            public static ProjectFundingSourceExpenditureUpdate Create(ProjectUpdateBatch projectUpdateBatch, FundingSource fundingSource, int calendarYear, decimal expenditureAmount)
            {
                var projectFundingSourceExpenditureUpdate = new ProjectFundingSourceExpenditureUpdate(projectUpdateBatch, fundingSource, calendarYear, expenditureAmount);

                return(projectFundingSourceExpenditureUpdate);
            }
コード例 #8
0
 public void AddFundingSource(FundingSource fundingSource)
 {
     fundingSourceRepository.Add(fundingSource);
 }
コード例 #9
0
            public static FundingSource CreateWithoutChangingName(Organization organization, string fundingSourceName)
            {
                var fundingSource = new FundingSource(organization, fundingSourceName, true);

                return(fundingSource);
            }