Beispiel #1
0
        public GridJsonNetJObjectResult <ProjectCalendarYearExpenditure> ProjectCalendarYearExpendituresGridJsonData(GrantAllocationPrimaryKey grantAllocationPrimaryKey)
        {
            var grantAllocation = grantAllocationPrimaryKey.EntityObject;
            var projectGrantAllocationExpenditures = grantAllocation.ProjectGrantAllocationExpenditures.ToList();
            var calendarYearRangeForExpenditures   =
                projectGrantAllocationExpenditures.CalculateCalendarYearRangeForExpenditures(grantAllocation);
            var gridSpec = new ProjectCalendarYearExpendituresGridSpec(calendarYearRangeForExpenditures);
            var projectGrantAllocations  = ProjectCalendarYearExpenditure.CreateFromProjectsAndCalendarYears(projectGrantAllocationExpenditures, calendarYearRangeForExpenditures);
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <ProjectCalendarYearExpenditure>(projectGrantAllocations, gridSpec);

            return(gridJsonNetJObjectResult);
        }
        public GridJsonNetJObjectResult <ProjectCalendarYearExpenditure> ProjectCalendarYearExpendituresGridJsonData(FundingSourcePrimaryKey fundingSourcePrimaryKey)
        {
            var fundingSource = fundingSourcePrimaryKey.EntityObject;
            var projectFundingSourceExpenditures = fundingSource.ProjectFundingSourceExpenditures.ToList();
            var calendarYearRangeForExpenditures =
                projectFundingSourceExpenditures.CalculateCalendarYearRangeForExpenditures(fundingSource);
            var gridSpec = new ProjectCalendarYearExpendituresGridSpec(calendarYearRangeForExpenditures);
            var projectFundingSources = ProjectCalendarYearExpenditure.CreateFromProjectsAndCalendarYears(projectFundingSourceExpenditures,
                                                                                                          calendarYearRangeForExpenditures);
            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <ProjectCalendarYearExpenditure>(projectFundingSources, gridSpec);

            return(gridJsonNetJObjectResult);
        }