protected GisImportViewData(Person currentPerson,
                                    Models.GisUploadAttempt gisUploadAttempt,
                                    string currentSectionDisplayName,
                                    GisImportSectionStatus gisImportSectionStatus) : this(gisUploadAttempt, currentPerson, currentSectionDisplayName)
        {
            IsInstructionsPage = currentSectionDisplayName.Equals("Instructions", StringComparison.InvariantCultureIgnoreCase);
            Check.Assert(gisUploadAttempt != null, "Project should be created in database by this point so it cannot be null.");


            CurrentPersonCanWithdraw = new GisUploadAttemptCreateFeature().HasPermission(currentPerson, gisUploadAttempt).HasPermission;

            GisUploadAttempt       = gisUploadAttempt;
            GisImportSectionStatus = gisImportSectionStatus;
            CanAdvanceStage        = GisImportSectionStatus.AreAllSectionsValidForGisUploadAttempt(gisUploadAttempt);
            // ReSharper disable PossibleNullReferenceException
            GisUploadAttemptStateIsValidInWizard = true;

            InstructionsPageUrl = SitkaRoute <GisProjectBulkUpdateController> .BuildUrlFromExpression(x =>
                                                                                                      x.InstructionsGisImport(gisUploadAttempt.GisUploadAttemptID));

            PageTitle = "GIS Bulk Project Upload";

            GeospatialValidationUrl = SitkaRoute <ProjectController> .BuildUrlFromExpression(x => x.Detail(gisUploadAttempt.GisUploadAttemptID));

            InitialUploadUrl = SitkaRoute <GisProjectBulkUpdateController> .BuildUrlFromExpression(x => x.UploadGisFile(gisUploadAttempt.GisUploadAttemptID));

            GisMetadataUrl = SitkaRoute <GisProjectBulkUpdateController> .BuildUrlFromExpression(x => x.GisMetadata(gisUploadAttempt.GisUploadAttemptID));

            ApproveUrl = SitkaRoute <ProjectCreateController> .BuildUrlFromExpression(x => x.Approve(gisUploadAttempt.GisUploadAttemptID));

            WithdrawUrl = SitkaRoute <ProjectCreateController> .BuildUrlFromExpression(x => x.Withdraw(gisUploadAttempt.GisUploadAttemptID));
        }
Exemplo n.º 2
0
 public UploadGisFileViewData(Person currentPerson,
                              GisUploadAttempt gisUploadAttempt
                              , GisImportSectionStatus gisImportSectionStatus
                              , string uploadUrl)
     : base(currentPerson, gisUploadAttempt, GisUploadAttemptWorkflowSection.UploadGisFile.GisUploadAttemptWorkflowSectionDisplayName, gisImportSectionStatus)
 {
     UploadUrl = uploadUrl;
 }
Exemplo n.º 3
0
 public UploadGisFileViewData(Person currentPerson,
                              GisUploadAttempt gisUploadAttempt
                              , GisImportSectionStatus gisImportSectionStatus
                              , string uploadUrl)
     : base(currentPerson, gisUploadAttempt, GisUploadAttemptWorkflowSection.UploadGisFile.GisUploadAttemptWorkflowSectionDisplayName, gisImportSectionStatus)
 {
     UploadUrl    = uploadUrl;
     CheckInfoUrl = SitkaRoute <GisProjectBulkUpdateController> .BuildUrlFromExpression(c => c.CheckStatusOfGisUploadAttempt(gisUploadAttempt.GisUploadAttemptID));
 }
Exemplo n.º 4
0
        public GisMetadataViewData(Person currentPerson,
                                   GisUploadAttempt gisUploadAttempt
                                   , GisImportSectionStatus gisImportSectionStatus
                                   , GisRecordGridSpec gisRecordGridSpec
                                   , List <Models.GisMetadataAttribute> gisMetadataAttributes
                                   , string gisMetadataPostUrl
                                   , string projectIndexUrl)
            : base(currentPerson, gisUploadAttempt, GisUploadAttemptWorkflowSection.ValidateMetadata.GisUploadAttemptWorkflowSectionDisplayName, gisImportSectionStatus)
        {
            GisRecordGridSpec = gisRecordGridSpec;
            GridDataUrl       = SitkaRoute <GisProjectBulkUpdateController> .BuildUrlFromExpression(tc => tc.GisRecordGridJsonData(gisUploadAttempt.GisUploadAttemptID));

            GridName = "GisRecordGrid";
            ProjectIDGisMetadataAttributes      = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            ProjectNameGisMetadataAttributes    = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            TreatmentTypeGisMetadataAttributes  = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            CompletionDateGisMetadataAttributes = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            StartDateGisMetadataAttributes      = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            ProjectStageGisMetadataAttributes   = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            TreatmentDetailedActivityTypeGisMetadataAttributes = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            TreatedAcresGisMetadataAttributes         = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            FootprintAcresGisMetadataAttributes       = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            PrivateLandownerMetadataAttributes        = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            PruningAcresGisMetadataAttributes         = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            ThinningAcresGisMetadataAttributes        = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            ChippingAcresGisMetadataAttributes        = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            MasticationAcresGisMetadataAttributes     = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            GrazingAcresGisMetadataAttributes         = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            LopScatAcresGisMetadataAttributes         = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            BiomassRemovalAcresGisMetadataAttributes  = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            HandPileAcresGisMetadataAttributes        = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            HandPileBurnAcresGisMetadataAttributes    = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            MachinePileBurnAcresGisMetadataAttributes = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            BroadcastBurnAcresGisMetadataAttributes   = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            OtherBurnAcresGisMetadataAttributes       = gisMetadataAttributes.ToSelectListWithEmptyFirstRow(x => x.GisMetadataAttributeID.ToString(CultureInfo.InvariantCulture), y => y.GisMetadataAttributeName);
            GisMetadataPostUrl = gisMetadataPostUrl;
            ProjectIndexUrl    = projectIndexUrl;
            IsFlattened        = gisUploadAttempt.GisUploadSourceOrganization.ImportIsFlattened.HasValue
                ? gisUploadAttempt.GisUploadSourceOrganization.ImportIsFlattened.Value
                : false;
        }
Exemplo n.º 5
0
 public InstructionsGisImportViewData(Person currentPerson, GisUploadAttempt gisUploadAttempt, GisImportSectionStatus gisImportSectionStatus, Models.FirmaPage firmaPage, bool isNewProjectCreate)
     : base(currentPerson, gisUploadAttempt, "Instructions", gisImportSectionStatus)
 {
     InstructionsViewPageContentViewData = new ViewPageContentViewData(firmaPage, new FirmaPageManageFeature().HasPermission(currentPerson, firmaPage).HasPermission);
 }