private ViewResult ViewEditProjectFundingSourceBudgetByCostType(Project project, List <int> calendarYearRange, EditProjectFundingSourceBudgetByCostTypeViewModel viewModel) { var allFundingSources = HttpRequestStorage.DatabaseEntities.FundingSources.ToList().Select(x => new FundingSourceSimple(x)).OrderBy(p => p.DisplayName).ToList(); var allCostTypes = HttpRequestStorage.DatabaseEntities.CostTypes.ToList().Select(x => new CostTypeSimple(x)).OrderBy(p => p.CostTypeName).ToList(); var fundingTypes = FundingType.All.ToList().ToSelectList(x => x.FundingTypeID.ToString(CultureInfo.InvariantCulture), y => y.FundingTypeDisplayName); var viewDataForAngularEditor = new EditProjectFundingSourceBudgetByCostTypeViewData.EditProjectFundingSourceBudgetByCostTypeViewDataForAngular(project, allFundingSources, allCostTypes, calendarYearRange, fundingTypes); var containerViewData = new EditProjectFundingSourceBudgetByCostTypeContainerViewData(CurrentFirmaSession, project, viewDataForAngularEditor, viewModel); return(RazorView <EditProjectFundingSourceBudgetByCostTypeContainer, EditProjectFundingSourceBudgetByCostTypeContainerViewData>(containerViewData)); }
public EditProjectFundingSourceBudgetByCostTypeUpdateWorkflowContainerViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, EditProjectFundingSourceBudgetByCostTypeViewData.EditProjectFundingSourceBudgetByCostTypeViewDataForAngular viewDataForAngularClass, ProjectBudgetSummaryViewData projectBudgetSummaryViewData, ProjectBudgetsAnnualByCostTypeViewData projectBudgetsAnnualByCostTypeViewData, ProjectUpdateStatus projectUpdateStatus, EditProjectFundingSourceBudgetByCostTypeValidationResult editProjectFundingSourceBudgetByCostTypeValidationResult, EditProjectFundingSourceBudgetByCostTypeViewModel viewModelForPartial ) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, editProjectFundingSourceBudgetByCostTypeValidationResult.GetWarningMessages(), ProjectUpdateSection.Budget.ProjectUpdateSectionDisplayName) { ProjectBudgetSummaryViewData = projectBudgetSummaryViewData; ProjectBudgetsAnnualByCostTypeViewData = projectBudgetsAnnualByCostTypeViewData; bool showApproveAndReturnButton = ProjectFundingSourceByCostTypeViewDataHelper.ShowApproveAndReturnButtonForUpdateWorkflow(projectUpdateBatch, currentFirmaSession); ViewDataForPartial = new EditProjectFundingSourceBudgetByCostTypeViewData(viewDataForAngularClass, ProjectFundingSourceBudgetViewEnum.Update, projectUpdateBatch, projectUpdateStatus.IsBudgetsUpdated, showApproveAndReturnButton); ViewModelForPartial = viewModelForPartial; }
public EditProjectFundingSourceBudgetByCostTypeCreateWorkflowContainerViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, EditProjectFundingSourceBudgetByCostTypeViewData.EditProjectFundingSourceBudgetByCostTypeViewDataForAngular viewDataForAngularClass, EditProjectFundingSourceBudgetByCostTypeViewModel viewModelForPartial ) : base(currentFirmaSession, project, ProjectCreateSection.Budget.ProjectCreateSectionDisplayName, proposalSectionsStatus) { RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ViewDataForPartial = new EditProjectFundingSourceBudgetByCostTypeViewData(viewDataForAngularClass, ProjectFundingSourceBudgetViewEnum.Create); ViewModelForPartial = viewModelForPartial; }