예제 #1
0
        public DetailViewData(FirmaSession currentFirmaSession,
            ProjectFirmaModels.Models.DocumentLibrary documentLibrary) : base(currentFirmaSession)
        {
            DocumentLibrary = documentLibrary;
            PageTitle = documentLibrary.DocumentLibraryName;

            FieldDefinitionForDocumentLibrary = FieldDefinitionEnum.DocumentLibrary.ToType();
            DocumentLibraryDisplayName = FieldDefinitionForDocumentLibrary.GetFieldDefinitionLabel();
            DocumentLibraryPluralized = FieldDefinitionForDocumentLibrary.GetFieldDefinitionLabelPluralized();
            EntityName = DocumentLibraryDisplayName;

            UserHasDocumentLibraryManagePermissions = new DocumentLibraryManageFeature().HasPermissionByFirmaSession(currentFirmaSession);
            EditDocumentLibraryUrl = documentLibrary.GetEditUrl();

            IndexUrl = SitkaRoute<DocumentLibraryController>.BuildUrlFromExpression(c => c.Index());

            DocumentLibraryDocumentGridSpec = new DocumentLibraryDocumentGridSpec(UserHasDocumentLibraryManagePermissions)
            {
                ObjectNameSingular = "Document", 
                ObjectNamePlural = "Documents",
                SaveFiltersInCookie = true
            };
            DocumentLibraryDocumentsGridName = "documentLibraryDocumentsGrid";
            DocumentLibraryDocumentGridDataUrl = SitkaRoute<DocumentLibraryController>.BuildUrlFromExpression(c => c.DocumentLibraryDocumentGridJsonData(documentLibrary));

            NewDocumentUrl = SitkaRoute<DocumentLibraryController>.BuildUrlFromExpression(x => x.NewDocument(documentLibrary));
            EditDocumentSortOrderUrl = SitkaRoute<DocumentLibraryController>.BuildUrlFromExpression(x => x.EditDocumentSortOrder(documentLibrary));
        }
예제 #2
0
        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 ProjectLocationsMapViewData(string mapDivID, ProjectFirmaModels.Models.FieldDefinition legendTitleFieldDefinition, List <TaxonomyTier> topLevelTaxonomyTiers, bool showProposals, bool legendAboveMap = false)
 {
     MapDivID = mapDivID;
     LegendTitleFieldDefinition = legendTitleFieldDefinition;
     LegendFormats  = ProjectMapLegendElement.BuildLegendFormatDictionary(topLevelTaxonomyTiers, showProposals);
     LegendAboveMap = legendAboveMap;
 }
예제 #4
0
 public ProjectExpendituresDetailViewData(List <FundingSourceCalendarYearExpenditure> fundingSourceExpenditures, List <CalendarYearString> calendarYearStrings, string expendituresNote)
 {
     FundingSourceExpenditures  = fundingSourceExpenditures;
     CalendarYearStrings        = calendarYearStrings;
     ExpendituresNote           = expendituresNote;
     FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType();
 }
예제 #5
0
        public ProjectBudgetsAnnualByCostTypeViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, List <ProjectFundingSourceCostTypeAmount> projectFundingSourceCostTypeAmounts, List <ProjectNoFundingSourceCostTypeAmount> projectNoFundingSourceCostTypeAmounts, string expectedFundingUpdateNote) : base(currentFirmaSession)
        {
            Project = project;
            FieldDefinitionForProject                      = FieldDefinitionEnum.Project.ToType();
            FieldDefinitionForFundingSource                = FieldDefinitionEnum.FundingSource.ToType();
            FieldDefinitionForCostType                     = FieldDefinitionEnum.CostType.ToType();
            FieldDefinitionForEstimatedTotalCost           = FieldDefinitionEnum.EstimatedTotalCost.ToType();
            FieldDefinitionForEstimatedAnnualOperatingCost = FieldDefinitionEnum.EstimatedAnnualOperatingCost.ToType();
            FieldDefinitionForProjectedFunding             = FieldDefinitionEnum.ProjectedFunding.ToType();
            FieldDefinitionForObligatedFunding             = FieldDefinitionEnum.ObligatedFunding.ToType();
            FieldDefinitionForExpendedFunding              = FieldDefinitionEnum.ExpendedFunding.ToType();

            ProjectFundingSourceCostTypeAmounts = projectFundingSourceCostTypeAmounts;
            var calendarYears     = project.CalculateCalendarYearRangeForBudgetsWithoutAccountingForExistingYears();
            var usedCalendarYears = projectFundingSourceCostTypeAmounts.Where(x => x.CalendarYear.HasValue && !calendarYears.Contains(x.CalendarYear.Value)).Select(x => x.CalendarYear.Value).Distinct().ToList();

            calendarYears.AddRange(usedCalendarYears);
            calendarYears.Sort();
            CalendarYears = calendarYears;

            ProjectNoFundingSourceCostTypeAmounts = projectNoFundingSourceCostTypeAmounts;

            ExpectedFundingUpdateNote    = expectedFundingUpdateNote;
            ObligationItemBudgetRollUps  = project.GetObligationItemBudgetRollUpByYearAndCostTypeAndFundingSourceSimples();
            ObligationItemInvoiceRollUps = project.GetObligationItemInvoiceRollUpByYearAndCostTypeAndFundingSourceSimples();
        }
예제 #6
0
 public EditViewData(PerformanceMeasureSimple performanceMeasure, List <TaxonomyTierSimple> taxonomyTiers, TaxonomyLevel associatePerformanceMeasureTaxonomyLevel)
 {
     PerformanceMeasure = performanceMeasure;
     AllTaxonomyTiers   = taxonomyTiers;
     _fieldDefinitionForTaxonomyTier   = associatePerformanceMeasureTaxonomyLevel.GetFieldDefinition();
     TaxonomyTierDisplayName           = GetFieldDefinitionForTaxonomyTier().GetFieldDefinitionLabel();
     TaxonomyTierDisplayNamePluralized = GetFieldDefinitionForTaxonomyTier().GetFieldDefinitionLabelPluralized();
 }
예제 #7
0
 public EditProjectFundingSourceExpendituresByCostTypeViewData(ViewDataForAngularClass viewDataForAngularClass)
 {
     ViewDataForAngular               = viewDataForAngularClass;
     FieldDefinitionForProject        = FieldDefinitionEnum.Project.ToType();
     FieldDefinitionForFundingSource  = FieldDefinitionEnum.FundingSource.ToType();
     FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType();
     FieldDefinitionForCostType       = FieldDefinitionEnum.CostType.ToType();
 }
예제 #8
0
        public EditViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.FieldDefinition fieldDefinition) : base(currentFirmaSession)
        {
            FieldDefinition           = fieldDefinition;
            FileBrowserImageUploadUrl = SitkaRoute <FileResourceController> .BuildUrlFromExpression(x => x.CkEditorUploadFileResourceForFieldDefinition(FieldDefinition, null));

            CancelUrl = SitkaRoute <FieldDefinitionController> .BuildUrlFromExpression(x => x.Index());

            IsSitkaAdministrator = currentFirmaSession.IsSitkaAdministrator();
        }
예제 #9
0
 public ProjectExpendituresByCostTypeDetailViewData(string exemptionExplanation, List <ProjectFundingSourceCostTypeAmount> projectFundingSourceCostTypeExpenditureAmounts)
 {
     ProjectFundingSourceCostTypeExpenditureAmountAmounts = projectFundingSourceCostTypeExpenditureAmounts;
     CalendarYears                   = projectFundingSourceCostTypeExpenditureAmounts.Select(x => x.CalendarYear.Value).Distinct().ToList();
     ExemptionExplanation            = exemptionExplanation;
     FieldDefinitionForProject       = FieldDefinitionEnum.Project.ToType();
     FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType();
     FieldDefinitionForCostType      = FieldDefinitionEnum.CostType.ToType();
 }
 public ProjectExpendituresByCostTypeSummaryViewData(List <ProjectExpenditureByCostType> projectExpenditureByCostTypes, List <CalendarYearString> calendarYears, List <CostType> costTypes)
 {
     CostTypes = costTypes;
     ProjectExpenditureByCostTypes = projectExpenditureByCostTypes;
     CalendarYears                   = calendarYears;
     FieldDefinitionForProject       = FieldDefinitionEnum.Project.ToType();
     FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType();
     FieldDefinitionForCostType      = FieldDefinitionEnum.CostType.ToType();
 }
예제 #11
0
        public CustomFieldDefinitionConflicts(ProjectFirmaModels.Models.FieldDefinition fieldDefinitionInConflict, FieldDefinitionData fieldDefinitionData)
        {
            DefaultInConflictFieldDefinitionID          = fieldDefinitionInConflict.FieldDefinitionID;
            DefaultInConflictFieldDefinitionDisplayName = fieldDefinitionInConflict.FieldDefinitionDisplayName;

            CustomFieldDefinitionDataID = fieldDefinitionData.FieldDefinitionDataID;
            CustomFieldDefinitionLabel  = fieldDefinitionData.FieldDefinitionLabel;

            DefaultFieldDefinitionID          = fieldDefinitionData.FieldDefinition.FieldDefinitionID;
            DefaultFieldDefinitionDisplayName = fieldDefinitionData.FieldDefinition.FieldDefinitionDisplayName;
        }
        public ExpendituresByCostTypeViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ViewDataForAngularClass viewDataForAngularClass, ProposalSectionsStatus proposalSectionsStatus)
            : base(currentFirmaSession, project, ProjectCreateSection.ReportedExpenditures.ProjectCreateSectionDisplayName, proposalSectionsStatus)
        {
            ViewDataForAngular      = viewDataForAngularClass;
            RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource());

            TotalOperatingCostInYearOfExpenditure     = project.CalculateTotalRemainingOperatingCost();
            StartYearForTotalOperatingCostCalculation = project.StartYearForTotalCostCalculations();
            FieldDefinitionForProject       = FieldDefinitionEnum.Project.ToType();
            FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType();
            FieldDefinitionForCostType      = FieldDefinitionEnum.CostType.ToType();
        }
 public EditProjectFundingSourceBudgetByCostTypeViewData(EditProjectFundingSourceBudgetByCostTypeViewData.ViewDataForAngularClass viewDataForAngularClass)
 {
     ViewDataForAngular                             = viewDataForAngularClass;
     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();
     FieldDefinitionForEstimatedTotalCost           = FieldDefinitionEnum.EstimatedTotalCost.ToType();
     FieldDefinitionForEstimatedAnnualOperatingCost = FieldDefinitionEnum.EstimatedAnnualOperatingCost.ToType();
 }
예제 #14
0
        public ImportGdbFileViewData(string mapFormID, string newGisUploadUrl, string approveGisUploadUrl)
        {
            MapFormID           = mapFormID;
            NewGisUploadUrl     = newGisUploadUrl;
            ApproveGisUploadUrl = approveGisUploadUrl;

            SupportedFileExtensions = new List <string> {
                "zip", "kml"
            };
            SupportedFileExtensionsCommaSeparated   = string.Join(", ", SupportedFileExtensions.OrderBy(x => x));
            FieldDefinitionForArcGISFileGeodatabase = FieldDefinitionEnum.ArcGISFileGeodatabase.ToType();
            FieldDefinitionForKMLFile = FieldDefinitionEnum.KMLFile.ToType();
            FieldDefinitionForKMZFile = FieldDefinitionEnum.KMZFile.ToType();
        }
 public ProjectLocationDetailViewData(int projectID, MapInitJson mapInitJson, LayerGeoJson editableLayerGeoJson, string uploadGisFileUrl,
                                      string mapFormID, string saveFeatureCollectionUrl, int annotationMaxLength, bool hasProjectLocationPoint, bool locationIsPrivate)
 {
     ProjectID                 = projectID;
     MapInitJson               = mapInitJson;
     EditableLayerGeoJson      = editableLayerGeoJson;
     UploadGisFileUrl          = uploadGisFileUrl;
     MapFormID                 = mapFormID;
     SaveFeatureCollectionUrl  = saveFeatureCollectionUrl;
     AnnotationMaxLength       = annotationMaxLength;
     HasProjectLocationPoint   = hasProjectLocationPoint;
     SimplePointMarkerImg      = "https://api.tiles.mapbox.com/v3/marker/pin-s-marker+838383.png";
     LocationIsPrivate         = locationIsPrivate;
     FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType();
 }
예제 #16
0
        public AgreementDetailViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Agreement agreement) : base(currentFirmaSession)
        {
            PageTitle  = $"Agreement Number: {agreement.AgreementNumber}";
            EntityName = "Agreement Detail";

            Agreement = agreement;
            UserHasAgreementManagePermissions = new AgreementManageFeature().HasPermissionByPerson(CurrentPerson);
            IsAdmin = new FirmaAdminFeature().HasPermissionByPerson(CurrentPerson);

            EditAgreementBasicsUrl = SitkaRoute <AgreementController> .BuildUrlFromExpression(c => c.EditBasics(agreement));

            /*
             * EditPerformanceMeasureUrl = SitkaRoute<PerformanceMeasureController>.BuildUrlFromExpression(c => c.Edit(performanceMeasure));
             * EditSubcategoriesAndOptionsUrl = SitkaRoute<PerformanceMeasureController>.BuildUrlFromExpression(c => c.EditSubcategoriesAndOptions(performanceMeasure));
             *
             * EditCriticalDefinitionsUrl = SitkaRoute<PerformanceMeasureController>.BuildUrlFromExpression(c => c.EditPerformanceMeasureRichText(performanceMeasure, EditRtfContent.PerformanceMeasureRichTextType.CriticalDefinitions));
             * EditProjectReportingUrl = SitkaRoute<PerformanceMeasureController>.BuildUrlFromExpression(c => c.EditPerformanceMeasureRichText(performanceMeasure, EditRtfContent.PerformanceMeasureRichTextType.ProjectReporting));
             */

            IndexUrl = SitkaRoute <AgreementController> .BuildUrlFromExpression(c => c.AgreementIndex());

            CostAuthorityIndexUrl = SitkaRoute <CostAuthorityController> .BuildUrlFromExpression(cac => cac.CostAuthorityIndex());

            FieldDefinitionForAgreement = FieldDefinitionEnum.Agreement.ToType();
            FieldDefinitionForProject   = FieldDefinitionEnum.Project.ToType();
            FieldDefinitionForCostAuthorityWorkBreakdownStructure = FieldDefinitionEnum.CostAuthorityWorkBreakdownStructure.ToType();


            /* Basic Project Info */
            BasicProjectInfoProjectGridName = "agreementProjectListGrid";
            BasicProjectInfoGridSpec        = new BasicProjectInfoGridSpec(currentFirmaSession, true, agreement)
            {
                ObjectNameSingular  = $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} associated with Agreement Number {agreement.AgreementNumber}",
                ObjectNamePlural    = $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabelPluralized()} associated with Agreement Number {agreement.AgreementNumber}",
                SaveFiltersInCookie = true
            };
            BasicProjectInfoProjectGridDataUrl = SitkaRoute <AgreementController> .BuildUrlFromExpression(tc => tc.AgreementProjectsGridJsonData(agreement));

            /* Cost Authority */
            BasicCostAuthorityGridName = "costAuthorityAgreementListGrid";
            BasicCostAuthorityGridSpec = new BasicCostAuthorityGridSpec(CurrentPerson)
            {
                ObjectNameSingular  = $"{FieldDefinitionEnum.CostAuthorityWorkBreakdownStructure.ToType().GetFieldDefinitionLabel()} associated with {FieldDefinitionEnum.Agreement.ToType().GetFieldDefinitionLabel()} {agreement.AgreementNumber}",
                ObjectNamePlural    = $"{FieldDefinitionEnum.CostAuthorityWorkBreakdownStructure.ToType().GetFieldDefinitionLabelPluralized()} associated with {FieldDefinitionEnum.Agreement.ToType().GetFieldDefinitionLabel()} {agreement.AgreementNumber}",
                SaveFiltersInCookie = true
            };
            BasicCostAuthorityGridDataUrl = SitkaRoute <AgreementController> .BuildUrlFromExpression(ac => ac.AgreementCostAuthorityGridJsonData(agreement));
        }
예제 #17
0
 public ProjectMapViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.FirmaPage firmaPage,
                           ProjectLocationsMapInitJson projectLocationsMapInitJson,
                           ProjectLocationsMapViewData projectLocationsMapViewData,
                           Dictionary <ProjectLocationFilterTypeSimple, IEnumerable <SelectListItem> >
                           projectLocationFilterTypesAndValues, string projectLocationsUrl,
                           string filteredProjectsWithLocationAreasUrl, List <ProjectColorByType> projectColorByTypes,
                           ProjectFirmaModels.Models.FieldDefinition fieldDefinitionForInitialColorByType) : base(currentFirmaSession, firmaPage)
 {
     PageTitle = $"{FieldDefinitionEnum.Project.ToType().GetFieldDefinitionLabel()} Map";
     ProjectLocationsMapInitJson         = projectLocationsMapInitJson;
     ProjectLocationFilterTypesAndValues = projectLocationFilterTypesAndValues;
     ProjectLocationsMapViewData         = projectLocationsMapViewData;
     ProjectLocationsUrl = projectLocationsUrl;
     FilteredProjectsWithLocationAreasUrl = filteredProjectsWithLocationAreasUrl;
     ProjectColorByTypes = projectColorByTypes;
     FieldDefinitionForInitialColorByType = fieldDefinitionForInitialColorByType;
 }
예제 #18
0
        public ProjectBudgetsByCostTypeSummaryViewData(FundingType fundingType, List <ProjectBudgetByCostType> projectBudgetByCostTypes, List <CalendarYearString> calendarYears, List <CostType> costTypes,
                                                       decimal?noFundingSourceIdentified, decimal?estimatedTotal, List <ProjectFundingSourceCostTypeAmount> projectFundingSourceCostTypeAmounts, string expectedFundingUpdateNote)
        {
            FundingType = fundingType;
            CostTypes   = costTypes;
            ProjectBudgetByCostTypes            = projectBudgetByCostTypes;
            CalendarYears                       = calendarYears;
            NoFundingSourceIdentified           = noFundingSourceIdentified;
            EstimatedTotal                      = estimatedTotal;
            ProjectFundingSourceCostTypeAmounts = projectFundingSourceCostTypeAmounts;
            ExpectedFundingUpdateNote           = expectedFundingUpdateNote;

            FieldDefinitionForProject         = FieldDefinitionEnum.Project.ToType();
            FieldDefinitionForFundingSource   = FieldDefinitionEnum.FundingSource.ToType();
            FieldDefinitionForCostType        = FieldDefinitionEnum.CostType.ToType();
            FieldDefinitionForSecuredFunding  = FieldDefinitionEnum.SecuredFunding.ToType();
            FieldDefinitionForTargetedFunding = FieldDefinitionEnum.TargetedFunding.ToType();
        }
        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 ProjectLocationSummaryViewData(IProject project,
                                       ProjectLocationSummaryMapInitJson projectLocationSummaryMapInitJson,
                                       Dictionary <int, string> dictionaryGeoNotes,
                                       List <GeospatialAreaType> geospatialAreaTypes,
                                       List <ProjectFirmaModels.Models.GeospatialArea> geospatialAreas,
                                       bool locationIsPrivate,
                                       bool userHasEditProjectPermissions)
 {
     ProjectLocationNotes = project.ProjectLocationNotes;
     ProjectLocationSummaryMapInitJson = projectLocationSummaryMapInitJson;
     GeospatialAreas               = geospatialAreas;
     HasLocationNotes              = !string.IsNullOrWhiteSpace(project.ProjectLocationNotes);
     HasLocationInformation        = project.ProjectLocationSimpleType != ProjectLocationSimpleType.None;
     DictionaryGeoNotes            = dictionaryGeoNotes;
     GeospatialAreaTypes           = geospatialAreaTypes;
     LocationIsPrivate             = locationIsPrivate;
     UserHasEditProjectPermissions = userHasEditProjectPermissions;
     FieldDefinitionForProject     = FieldDefinitionEnum.Project.ToType();
 }
예제 #21
0
        public ExpectedFundingByCostTypeViewData(FirmaSession currentFirmaSession,
                                                 ProjectFirmaModels.Models.Project project,
                                                 ProposalSectionsStatus proposalSectionsStatus,
                                                 ViewDataForAngularClass viewDataForAngularClass
                                                 ) : base(currentFirmaSession, project, ProjectCreateSection.Budget.ProjectCreateSectionDisplayName, proposalSectionsStatus)
        {
            RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource());

            ViewDataForAngular                             = viewDataForAngularClass;
            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();
            FieldDefinitionForEstimatedTotalCost           = FieldDefinitionEnum.EstimatedTotalCost.ToType();
            FieldDefinitionForEstimatedAnnualOperatingCost = FieldDefinitionEnum.EstimatedAnnualOperatingCost.ToType();
        }
예제 #22
0
        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 EditProfileSupplementalInformationViewData()
 {
     FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType();
 }
 public EditProjectUpdateConfigurationViewData(FirmaSession currentFirmaSession) : base(currentFirmaSession)
 {
     FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType();
 }
 public static void DeleteFieldDefinition(this IQueryable <FieldDefinition> fieldDefinitions, FieldDefinition fieldDefinitionToDelete)
 {
     DeleteFieldDefinition(fieldDefinitions, new List <FieldDefinition> {
         fieldDefinitionToDelete
     });
 }