Пример #1
0
 public static bool AreReportedPerformanceMeasuresValid(this ProjectUpdateBatch projectUpdateBatch)
 {
     return(!MultiTenantHelpers.TrackAccomplishments() || projectUpdateBatch.NewStageIsPlanningDesign() || PerformanceMeasuresValidationResult.AreAllValid(projectUpdateBatch.ValidatePerformanceMeasures()));
 }
Пример #2
0
        private static void CommitChangesToProject(this ProjectUpdateBatch projectUpdateBatch, DatabaseEntities databaseEntities)
        {
            // basics
            projectUpdateBatch.ProjectUpdate.CommitBasicsChangesToProject(projectUpdateBatch.Project);

            // expenditures
            ProjectFundingSourceExpenditureUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // expected funding
            ProjectFundingSourceBudgetUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            ProjectNoFundingSourceIdentifiedUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // project exempt reporting years
            ProjectExemptReportingYearUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);
            projectUpdateBatch.Project.ExpendituresNote = projectUpdateBatch.ExpendituresNote;

            // project relevant cost types
            ProjectRelevantCostTypeUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // only relevant for stages past planning/design
            if (!projectUpdateBatch.NewStageIsPlanningDesign())
            {
                // reported performance measures
                PerformanceMeasureActualUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

                // project exempt reporting years reason
                projectUpdateBatch.Project.PerformanceMeasureActualYearsExemptionExplanation = projectUpdateBatch.PerformanceMeasureActualYearsExemptionExplanation;
            }

            // expected performance measures
            PerformanceMeasureExpectedUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);


            // project location simple
            projectUpdateBatch.ProjectUpdate.CommitSimpleLocationToProject(projectUpdateBatch.Project);

            // project location detailed
            ProjectLocationUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // project geospatialArea
            ProjectGeospatialAreaUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);
            ProjectGeospatialAreaTypeNoteUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // photos
            ProjectImageUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // external links
            ProjectExternalLinkUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // notes
            ProjectNoteUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // Organizations
            ProjectOrganizationUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            //  Contacts
            ProjectContactUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // Attachments
            ProjectAttachmentUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // Project Custom Attributes
            ProjectCustomAttributeUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            // Technical Assistance Requests - for Idaho
            TechnicalAssistanceRequestUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);

            //Project Classifications
            ProjectClassificationsUpdateModelExtensions.CommitChangesToProject(projectUpdateBatch, databaseEntities);
        }
Пример #3
0
 public static bool AreReportedPerformanceMeasuresValid(this ProjectUpdateBatch projectUpdateBatch)
 {
     return(projectUpdateBatch.NewStageIsPlanningDesign() || PerformanceMeasuresValidationResult.AreAllValid(projectUpdateBatch.ValidatePerformanceMeasures()));
 }