public EditAgreementGrantAllocationsViewModel(Models.Agreement agreement) { AgreementId = agreement.AgreementID; // Generate GrantAllocationJsons that are ordered descending by first part of GrantNumber var grantAllocations = agreement.AgreementGrantAllocations.Select(x => x.GrantAllocation).ToList(); GrantAllocationJsons = GrantAllocationJson.MakeGrantAllocationJsonsFromGrantAllocations(grantAllocations); }
public EditAgreementGrantAllocationsViewData() { var databaseEntitiesGrantAllocations = HttpRequestStorage.DatabaseEntities.GrantAllocations.ToList(); AllPossibleGrantAllocationJsons = GrantAllocationJson.MakeGrantAllocationJsonsFromGrantAllocations(databaseEntitiesGrantAllocations); }