public ViewResult GrantAllocationAwardDetail(GrantAllocationAwardPrimaryKey grantAllocationAwardPrimaryKey) { var grantAllocationAward = grantAllocationAwardPrimaryKey.EntityObject; if (grantAllocationAward == null) { throw new Exception($"Could not find GrantAllocationAwardID # {grantAllocationAwardPrimaryKey.PrimaryKeyValue}; has it been deleted?"); } var backButtonUrl = SitkaRoute <FocusAreaController> .BuildUrlFromExpression(x => x.Detail(grantAllocationAward.FocusAreaID)); var backButtonText = $"Back to {FieldDefinition.FocusArea.GetFieldDefinitionLabel()}: {grantAllocationAward.FocusArea.FocusAreaName}"; var suppliesLineItemGridSpec = new SuppliesLineItemGridSpec(CurrentPerson, grantAllocationAward); var personnelAndBenefitsLineItemGridSpec = new PersonnelAndBenefitsLineItemGridSpec(CurrentPerson, grantAllocationAward); var travelLineItemGridSpec = new TravelLineItemGridSpec(CurrentPerson, grantAllocationAward); var landownerCostShareLineItemGridSpec = new LandownerCostShareLineItemGridSpec(CurrentPerson, grantAllocationAward); var contractorInvoiceItemGridSpec = new ContractorInvoiceItemGridSpec(CurrentPerson, grantAllocationAward); var viewData = new Views.GrantAllocationAward.DetailViewData(CurrentPerson, grantAllocationAward, backButtonUrl, backButtonText, suppliesLineItemGridSpec, personnelAndBenefitsLineItemGridSpec, travelLineItemGridSpec, landownerCostShareLineItemGridSpec, contractorInvoiceItemGridSpec); return(RazorView <Views.GrantAllocationAward.Detail, Views.GrantAllocationAward.DetailViewData>(viewData)); }
public GridJsonNetJObjectResult <GrantAllocationAwardTravelLineItem> TravelLineItemGridJsonData(GrantAllocationAwardPrimaryKey grantAllocationAwardPrimaryKey) { var grantAllocationAward = grantAllocationAwardPrimaryKey.EntityObject; var travelLineItems = grantAllocationAward.GrantAllocationAwardTravelLineItems; var gridSpec = new TravelLineItemGridSpec(CurrentPerson, grantAllocationAward); var gridJsonNetJObjectResult = new GridJsonNetJObjectResult <GrantAllocationAwardTravelLineItem>(travelLineItems.ToList(), gridSpec); return(gridJsonNetJObjectResult); }