public ExpectedFundingByCostTypeViewData(FirmaSession currentFiramSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectBudgetSummaryViewData projectBudgetSummaryViewData, ProjectBudgetsAnnualByCostTypeViewData projectBudgetsAnnualByCostTypeViewData, ProjectUpdateStatus projectUpdateStatus, ExpectedFundingValidationResult expectedFundingValidationResult ) : base(currentFiramSession, projectUpdateBatch, projectUpdateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.Budget.ProjectUpdateSectionDisplayName) { RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFundingByCostType(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFundingByCostType(projectUpdateBatch.Project)); ViewDataForAngular = viewDataForAngularClass; ProjectBudgetSummaryViewData = projectBudgetSummaryViewData; ProjectBudgetsAnnualByCostTypeViewData = projectBudgetsAnnualByCostTypeViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned()); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); FieldDefinitionForNoFundingSourceIdentified = FieldDefinitionEnum.NoFundingSourceIdentified.ToType(); FieldDefinitionForSecuredFunding = FieldDefinitionEnum.SecuredFunding.ToType(); FieldDefinitionForTargetedFunding = FieldDefinitionEnum.TargetedFunding.ToType(); FieldDefinitionForPlanningDesignStartYear = FieldDefinitionEnum.PlanningDesignStartYear.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); }
public ReportedPerformanceMeasuresViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularEditor viewDataForAngularEditor, ProjectUpdateStatus projectUpdateStatus, List <PerformanceMeasuresValidationResult> performanceMeasuresValidationResults) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, PerformanceMeasuresValidationResult.GetAllWarningMessages(performanceMeasuresValidationResults), ProjectUpdateSection.ReportedAccomplishments.ProjectUpdateSectionDisplayName) { RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshReportedPerformanceMeasures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffReportedPerformanceMeasures(projectUpdateBatch.Project)); var performanceMeasureActualUpdates = projectUpdateBatch.PerformanceMeasureActualUpdates; var performanceMeasureSubcategoriesCalendarYearReportedValues = PerformanceMeasureSubcategoriesCalendarYearReportedValue.CreateFromPerformanceMeasuresAndCalendarYears(new List <IPerformanceMeasureReportedValue>(PerformanceMeasureReportedValue.MakeFromList(performanceMeasureActualUpdates))); PerformanceMeasureReportedValuesSummaryViewData = new PerformanceMeasureReportedValuesSummaryViewData(performanceMeasureSubcategoriesCalendarYearReportedValues, projectUpdateBatch.GetPerformanceMeasuresExemptReportingYears().Select(x => x.CalendarYear).ToList(), projectUpdateBatch.PerformanceMeasureActualYearsExemptionExplanation, performanceMeasureActualUpdates.Select(x => x.PerformanceMeasureReportingPeriod.PerformanceMeasureReportingPeriodCalendarYear).Distinct().Select(x => new CalendarYearString(x)).ToList()); ViewDataForAngular = viewDataForAngularEditor; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ReportedPerformanceMeasuresComment, projectUpdateBatch.IsReturned()); IsImplementationStartYearValid = projectUpdateBatch.ProjectUpdate.ImplementationStartYear.HasValue && projectUpdateBatch.ProjectUpdate.ImplementationStartYear < projectUpdateBatch.ProjectUpdate.CompletionYear; ReportingYearLabel = "Year"; }
public LocationDetailedViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ProjectLocationDetailViewData projectLocationDetailViewData, string uploadGisFileUrl, ProjectUpdateStatus projectUpdateStatus) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, new List <string>(), ProjectUpdateSection.LocationDetailed.ProjectUpdateSectionDisplayName) { ProjectLocationDetailViewData = projectLocationDetailViewData; UploadGisFileUrl = uploadGisFileUrl; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectLocationDetailed(projectUpdateBatch.Project)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.LocationDetailedComment, projectUpdateBatch.IsReturned()); }
public ContactsViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, UpdateStatus updateStatus, EditPeopleViewData editPeopleViewData, ContactsValidationResult organizationsValidationResult, ProjectPeopleDetailViewData projectPeopleDetailViewData) : base( currentPerson, projectUpdateBatch, updateStatus, organizationsValidationResult.GetWarningMessages(), ProjectUpdateSection.Contacts.ProjectUpdateSectionDisplayName) { EditPeopleViewData = editPeopleViewData; ProjectPeopleDetailViewData = projectPeopleDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ContactsComment, projectUpdateBatch.IsReturned); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshContacts(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffContacts(projectUpdateBatch.Project)); }
public OrganizationsViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ProjectUpdateStatus projectUpdateStatus, EditOrganizationsViewData editOrganizationsViewData, OrganizationsValidationResult organizationsValidationResult, ProjectOrganizationsDetailViewData projectOrganizationsDetailViewData) : base( currentFirmaSession, projectUpdateBatch, projectUpdateStatus, organizationsValidationResult.GetWarningMessages(), ProjectUpdateSection.Organizations.ProjectUpdateSectionDisplayName) { EditOrganizationsViewData = editOrganizationsViewData; ProjectOrganizationsDetailViewData = projectOrganizationsDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.OrganizationsComment, projectUpdateBatch.IsReturned()); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshOrganizations(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffOrganizations(projectUpdateBatch.Project)); }
public TechnicalAssistanceRequestsViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.FirmaPage firmaPage, ProjectUpdateBatch projectUpdateBatch, ProjectUpdateStatus projectUpdateStatus, List <TechnicalAssistanceType> technicalAssistanceTypes, List <CalendarYearString> fiscalYearStrings, List <PersonSimple> personSimples) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, new List <string>(), ProjectUpdateSection.TechnicalAssistanceRequests.ProjectUpdateSectionDisplayName) { Check.EnsureNotNull(firmaPage, "The Firma Page for this section is not found; is one defined?"); bool hasPermissionToManageFirmaPage = new FirmaPageManageFeature().HasPermission(currentFirmaSession, firmaPage).HasPermission; TechnicalAssistanceInstructionsViewData = new ViewPageContentViewData(firmaPage, hasPermissionToManageFirmaPage); UserCanAllocate = new ProjectUpdateAdminFeatureWithProjectContext().HasPermission(currentFirmaSession, projectUpdateBatch.Project).HasPermission; ViewDataForAngular = new TechnicalAssistanceRequestsViewDataForAngular(projectUpdateBatch.ProjectID, technicalAssistanceTypes, fiscalYearStrings, personSimples); SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.TechnicalAssistanceRequestsComment, projectUpdateBatch.IsReturned()); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshTechnicalAssistanceRequests(projectUpdateBatch.Project)); }
public PriorityLandscapesViewData(Person currentPerson, Models.ProjectUpdate projectUpdate, EditProjectPriorityLandscapesViewData editProjectPriorityLandscapesViewData, ProjectLocationSummaryViewData projectLocationSummaryViewData, PriorityLandscapesValidationResult priorityLandscapeValidationResult, UpdateStatus updateStatus) : base(currentPerson, projectUpdate.ProjectUpdateBatch, updateStatus, priorityLandscapeValidationResult.GetWarningMessages(), "Priority Landscapes") { EditProjectPriorityLandscapesViewData = editProjectPriorityLandscapesViewData; ProjectLocationSummaryViewData = projectLocationSummaryViewData; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectPriorityLandscape(projectUpdate.ProjectUpdateBatch.Project)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.LocationSimpleComment, projectUpdate.ProjectUpdateBatch.IsReturned); }
public ExpendituresViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresDetailViewData projectExpendituresDetailViewData, UpdateStatus updateStatus, List <string> expendituresValidationErrors) : base(currentPerson, projectUpdateBatch, updateStatus, expendituresValidationErrors, "THIS IS BROKEN!" /* 5/15/2019 TK- ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName*/) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(projectUpdateBatch.Project)); RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); ProjectExpendituresDetailViewData = projectExpendituresDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned); }
public DNRUplandRegionsViewData(Person currentPerson, Models.ProjectUpdate projectUpdate, EditProjectRegionsViewData editProjectRegionsViewData, ProjectLocationSummaryViewData projectLocationSummaryViewData, DNRUplandRegionsValidationResult dnrUplandRegionValidationResult, UpdateStatus updateStatus) : base(currentPerson, projectUpdate.ProjectUpdateBatch, updateStatus, dnrUplandRegionValidationResult.GetWarningMessages(), ProjectUpdateSection.DNRUplandRegions.ProjectUpdateSectionDisplayName) { EditProjectRegionsViewData = editProjectRegionsViewData; ProjectLocationSummaryViewData = projectLocationSummaryViewData; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectRegion(projectUpdate.ProjectUpdateBatch.Project)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.LocationSimpleComment, projectUpdate.ProjectUpdateBatch.IsReturned); }
public ExpectedPerformanceMeasuresViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ProjectUpdateStatus projectUpdateStatus, ViewDataForAngularEditor viewDataForAngular, PerformanceMeasureExpectedValuesSummaryViewData performanceMeasureExpectedValuesSummaryViewData) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, new List <string>(), ProjectUpdateSection.ExpectedAccomplishments.ProjectUpdateSectionDisplayName) { RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedPerformanceMeasures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedPerformanceMeasures(projectUpdateBatch.Project)); ViewDataForAngular = viewDataForAngular; PerformanceMeasureExpectedValuesSummaryViewData = performanceMeasureExpectedValuesSummaryViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedPerformanceMeasuresComment, projectUpdateBatch.IsReturned()); }
public GeospatialAreaViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.ProjectUpdate projectUpdate, EditProjectGeospatialAreasViewData editProjectGeospatialAreasViewData, ProjectLocationSummaryViewData projectLocationSummaryViewData, GeospatialAreaValidationResult geospatialAreaValidationResult, ProjectUpdateStatus projectUpdateStatus, GeospatialAreaType geospatialAreaType) : base(currentFirmaSession, projectUpdate.ProjectUpdateBatch, projectUpdateStatus, geospatialAreaValidationResult.GetWarningMessages(), geospatialAreaType.GeospatialAreaTypeNamePluralized) { EditProjectGeospatialAreasViewData = editProjectGeospatialAreasViewData; ProjectLocationSummaryViewData = projectLocationSummaryViewData; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectGeospatialArea(projectUpdate.ProjectUpdateBatch.Project, geospatialAreaType)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.LocationSimpleComment, projectUpdate.ProjectUpdateBatch.IsReturned()); GeospatialAreaType = geospatialAreaType; }
public ExpectedFundingViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectFundingDetailViewData projectFundingDetailViewData, UpdateStatus updateStatus, ExpectedFundingValidationResult expectedFundingValidationResult) : base(currentPerson, projectUpdateBatch, updateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.ExpectedFunding.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFunding(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFunding(projectUpdateBatch.Project)); RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); ProjectFundingDetailViewData = projectFundingDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned); ValidationWarnings = expectedFundingValidationResult.GetWarningMessages(); FundingSources = FundingSource.All.ToSelectList(x => x.FundingSourceID.ToString(), y => y.FundingSourceDisplayName).ToList(); }
public ProjectCustomAttributesViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ProjectUpdateStatus projectUpdateStatus, List <string> validationWarnings, string sectionDisplayName, EditProjectCustomAttributesViewData editCustomAttributesViewData, DisplayProjectCustomAttributesViewData displayProjectCustomAttributesViewData) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, validationWarnings, sectionDisplayName) { EditCustomAttributesViewData = editCustomAttributesViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.CustomAttributesComment, projectUpdateBatch.IsReturned()); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectCustomAttributes(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffProjectCustomAttributes(projectUpdateBatch.Project)); DisplayProjectCustomAttributesViewData = displayProjectCustomAttributesViewData; }
public ExpectedFundingViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectBudgetSummaryViewData projectBudgetSummaryViewData, ProjectBudgetsAnnualViewData projectBudgetsAnnualViewData, ProjectUpdateStatus projectUpdateStatus, ExpectedFundingValidationResult expectedFundingValidationResult) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.Budget.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFunding(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFunding(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectBudgetSummaryViewData = projectBudgetSummaryViewData; ProjectBudgetsAnnualViewData = projectBudgetsAnnualViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned()); ValidationWarnings = expectedFundingValidationResult.GetWarningMessages(); FundingTypeDescriptionString = projectUpdateBatch.ProjectUpdate.FundingTypeID == FundingType.BudgetVariesByYear.FundingTypeID ? " varies by year or it's a one-year project." : " is the same each year."; }
public CustomAttributesViewData(Person currentPerson, Models.ProjectUpdate projectUpdate, UpdateStatus updateStatus, ProjectAttributeValidationResult projectAttributeValidationResult, IEnumerable <Models.ProjectCustomAttributeType> projectCustomAttributeTypes) : base(currentPerson, projectUpdate.ProjectUpdateBatch, updateStatus, projectAttributeValidationResult.GetWarningMessages(), ProjectUpdateSection.ProjectAttributes.ProjectUpdateSectionDisplayName) { ProjectUpdate = projectUpdate; DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffProjectAttributes(Project)); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectAttributes(Project)); ProjectCustomAttributeTypes = projectCustomAttributeTypes; SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.ProjectAttributesComment, projectUpdate.ProjectUpdateBatch.IsReturned); }
public LocationSimpleViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.ProjectUpdate projectUpdate, ProjectLocationSimpleViewData projectLocationSimpleViewData, ProjectLocationSummaryViewData projectLocationSummaryViewData, LocationSimpleValidationResult locationSimpleValidationResult, ProjectUpdateStatus projectUpdateStatus) : base(currentFirmaSession, projectUpdate.ProjectUpdateBatch, projectUpdateStatus, locationSimpleValidationResult.GetWarningMessages(), ProjectUpdateSection.LocationSimple.ProjectUpdateSectionDisplayName) { ProjectLocationSimpleViewData = projectLocationSimpleViewData; ProjectLocationSummaryViewData = projectLocationSummaryViewData; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectLocationSimple(projectUpdate.ProjectUpdateBatch.Project)); SectionCommentsViewData = new SectionCommentsViewData( projectUpdate.ProjectUpdateBatch.LocationSimpleComment, projectUpdate.ProjectUpdateBatch.IsReturned()); ValidationWarnings = locationSimpleValidationResult.GetWarningMessages(); }
public ExpendituresByCostTypeViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresByCostTypeDetailViewData projectExpendituresByCostTypeDetailViewData, ProjectUpdateStatus projectUpdateStatus, List <string> expendituresValidationErrors) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpendituresByCostType(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectExpendituresByCostTypeDetailViewData = projectExpendituresByCostTypeDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned()); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); }
public ExpendituresViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresDetailViewData projectExpendituresDetailViewData, ProjectUpdateStatus projectUpdateStatus, List <string> expendituresValidationErrors) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, "OBSOLETE Expenditures") //: base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName) { ProjectID = projectUpdateBatch.ProjectID; ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectExpendituresDetailViewData = projectExpendituresDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned()); TotalOperatingCostInYearOfExpenditure = ProjectUpdateBatch.ProjectUpdate.CalculateTotalRemainingOperatingCost(); StartYearForTotalOperatingCostCalculation = projectUpdateBatch.ProjectUpdate.StartYearForTotalCostCalculations(); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); }
public BasicsViewData(FirmaSession currentFirmaSession , ProjectFirmaModels.Models.ProjectUpdate projectUpdate, IEnumerable <ProjectStage> projectStages , ProjectUpdateStatus projectUpdateStatus, BasicsValidationResult basicsValidationResult) : base(currentFirmaSession, projectUpdate.ProjectUpdateBatch, projectUpdateStatus, basicsValidationResult.GetWarningMessages(), ProjectUpdateSection.Basics.ProjectUpdateSectionDisplayName) { ProjectUpdate = projectUpdate; TaxonomyLeafDisplayName = projectUpdate.ProjectUpdateBatch.Project.TaxonomyLeaf.GetDisplayName(); ProjectStages = projectStages.OrderBy(x => x.SortOrder).ToSelectListWithEmptyFirstRow(x => x.ProjectStageID.ToString(CultureInfo.InvariantCulture), y => y.ProjectStageDisplayName); ProjectStagesModels = projectStages; PlanningDesignStartYearRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay).ToList(); ImplementationStartYearRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay).ToList(); CompletionYearRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay).ToList(); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshBasics(Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffBasics(Project)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.BasicsComment, projectUpdate.ProjectUpdateBatch.IsReturned()); StartYearForTotalCostCalculation = projectUpdate.StartYearForTotalCostCalculations(); TenantUsesFiscalYears = MultiTenantHelpers.UseFiscalYears(); }
public BasicsViewData(Person currentPerson, Models.ProjectUpdate projectUpdate, IEnumerable <ProjectStage> projectStages, UpdateStatus updateStatus, BasicsValidationResult basicsValidationResult, IEnumerable <Models.ProjectCustomAttributeType> projectCustomAttributeTypes, List <Models.FocusArea> focusAreas) : base(currentPerson, projectUpdate.ProjectUpdateBatch, updateStatus, basicsValidationResult.GetWarningMessages(), ProjectUpdateSection.Basics.ProjectUpdateSectionDisplayName) { ProjectUpdate = projectUpdate; ProjectTypeDisplayName = projectUpdate.ProjectUpdateBatch.Project.ProjectType.DisplayName; ProjectStages = projectStages.OrderBy(x => x.SortOrder).ToSelectListWithEmptyFirstRow(x => x.ProjectStageID.ToString(CultureInfo.InvariantCulture), y => y.ProjectStageDisplayName); FocusAreas = focusAreas.OrderBy(x => x.FocusAreaName) .ToSelectListWithEmptyFirstRow(x => x.FocusAreaID.ToString(CultureInfo.InvariantCulture), y => y.FocusAreaName); PlannedDateRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay); ImplementationStartYearRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay); CompletionDateRange = FirmaDateUtilities.YearsForUserInput().ToSelectListWithEmptyFirstRow(x => x.CalendarYear.ToString(CultureInfo.InvariantCulture), x => x.CalendarYearDisplay); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshBasics(Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffBasics(Project)); SectionCommentsViewData = new SectionCommentsViewData(projectUpdate.ProjectUpdateBatch.BasicsComment, projectUpdate.ProjectUpdateBatch.IsReturned); ProjectCustomAttributeTypes = projectCustomAttributeTypes; }