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));
        }
        public GisImportSectionStatus(Models.GisUploadAttempt gisUploadAttempt)
        {
            //var basicsResults = new BasicsViewModel(project).GetValidationResults();
            //IsBasicsSectionComplete = !basicsResults.Any();

            IsInitialUploadComplete        = false;
            IsGeospatialValidationComplete = false;
        }
        private GisImportViewData(Models.GisUploadAttempt gisUploadAttempt, Person currentPerson, string currentSectionDisplayName) : base(currentPerson)
        {
            EntityName         = $"{Models.FieldDefinition.Application.GetFieldDefinitionLabel()}";
            ProvideFeedbackUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.ProposalFeedback());

            CurrentPersonIsSubmitter = gisUploadAttempt.GisUploadAttemptCreatePersonID == currentPerson.PersonID;
            CurrentPersonIsApprover  = gisUploadAttempt.GisUploadAttemptCreatePersonID == currentPerson.PersonID;
            GisUploadAttemptWorkflowSectionGroupings = GisUploadAttemptWorkflowSectionGrouping.All.OrderBy(x => x.SortOrder).ToList();
            CurrentSectionDisplayName = currentSectionDisplayName;
        }
 public static bool AreAllSectionsValidForGisUploadAttempt(Models.GisUploadAttempt gisUploadAttempt)
 {
     //return Models.Project.GetApplicableProposalWizardSections(project, false).All(x => x.IsComplete);
     return(false);
 }