public GridJsonNetJObjectResult<GrantAllocationBudgetLineItemForGrid> GrantAllocationBudgetLineItemGridJsonDataByGrant(GrantPrimaryKey grantPrimaryKey)
 {
     var relevantGrant = grantPrimaryKey.EntityObject;
     // Create button is irrelevant to this data-only usage
     var gridSpec = new GrantAllocationBudgetLineItemGridSpec();
     var grantAllocations = relevantGrant.GrantModifications.SelectMany(gm => gm.GrantAllocations).ToList();
     var budgetLineItems = grantAllocations.Select(ga => new GrantAllocationBudgetLineItemForGrid(ga)).ToList();
     var gridJsonNetJObjectResult = new GridJsonNetJObjectResult<GrantAllocationBudgetLineItemForGrid>(budgetLineItems, gridSpec);
     return gridJsonNetJObjectResult;
 }
Exemple #2
0
        public GridJsonNetJObjectResult <GrantAllocationBudgetLineItem> GrantAllocationBudgetLineItemGridJsonData(GrantAllocationPrimaryKey grantAllocationPrimaryKey)
        {
            var grantAllocation = grantAllocationPrimaryKey.EntityObject;
            var gridSpec        = new GrantAllocationBudgetLineItemGridSpec(CurrentPerson, grantAllocation);

            var grantAllocationBudgetLineItems = grantAllocation.GrantAllocationBudgetLineItems.ToList();

            var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <GrantAllocationBudgetLineItem>(grantAllocationBudgetLineItems, gridSpec);

            return(gridJsonNetJObjectResult);
        }