private ViewResult ViewInstructions(InstructionsViewModel viewModel, OnlandVisualTrashAssessment ovta)
        {
            var viewData = new InstructionsViewData(CurrentPerson,
                                                    NeptunePage.GetNeptunePageByPageType(NeptunePageType.OVTAInstructions), ovta);

            return(RazorView <Instructions, InstructionsViewData, InstructionsViewModel>(viewData, viewModel));
        }
Exemplo n.º 2
0
        public ViewResult Index()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.FundingSourcesList);
            var viewData    = new IndexViewData(CurrentPerson, neptunePage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 3
0
        public ViewResult Index()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.Jurisdiction);
            var viewData    = new IndexViewData(CurrentPerson, neptunePage);

            return(RazorView <Index, IndexViewData>(viewData));
        }
        public ViewResult Index()
        {
            var viewData = new IndexViewData(CurrentPerson,
                                             NeptunePage.GetNeptunePageByPageType(NeptunePageType.OVTAIndex), SitkaRoute <OnlandVisualTrashAssessmentExportController> .BuildUrlFromExpression(x => x.ExportAssessmentGeospatialData()));

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 5
0
        public ViewResult Manage()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypesList);
            var viewData    = new ManageViewData(CurrentPerson, neptunePage);

            return(RazorView <Manage, ManageViewData>(viewData));
        }
Exemplo n.º 6
0
        public IndexViewData(Person currentPerson, NeptunePage neptunePage, string exportUrl)
            : base(currentPerson, neptunePage)
        {
            ExportUrl  = exportUrl;
            PageTitle  = "All OVTAs";
            EntityName = $"{FieldDefinitionType.OnlandVisualTrashAssessment.GetFieldDefinitionLabelPluralized()}";
            GridSpec   = new OnlandVisualTrashAssessmentIndexGridSpec(currentPerson, true)
            {
                ObjectNameSingular  = "Assessment",
                ObjectNamePlural    = "Assessments",
                SaveFiltersInCookie = true
            };
            GridName    = "onlandVisualTrashAssessmentsGrid";
            GridDataUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(j => j.OVTAGridJsonData());

            AreaGridSpec = new OnlandVisualTrashAssessmentAreaIndexGridSpec(currentPerson)
            {
                ObjectNameSingular  = "Area",
                ObjectNamePlural    = "Areas",
                SaveFiltersInCookie = true
            };
            AreaGridName    = "onlandVisualTrashAssessmentsAreaGrid";
            AreaGridDataUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(j => j.OnlandVisualTrashAssessmentAreaGridData());

            NewUrl = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.Instructions(null));

            HasManagePermissions = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson);
            HasEditPermissions   = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson);
        }
Exemplo n.º 7
0
        private PartialViewResult ViewEditInDialog(EditViewModel viewModel, NeptunePage neptunePage)
        {
            var ckEditorToolbar = CkEditorExtension.CkEditorToolbar.AllOnOneRowNoMaximize;
            var viewData        = new EditViewData(ckEditorToolbar,
                                                   SitkaRoute <FileResourceController> .BuildUrlFromExpression(x => x.CkEditorUploadFileResource(neptunePage)));

            return(RazorPartialView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
Exemplo n.º 8
0
        public ViewResult Index()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.Assessment);
            var treatmentBMPAssessmentObservationTypes = HttpRequestStorage.DatabaseEntities.TreatmentBMPAssessmentObservationTypes.ToList();
            var viewData = new IndexViewData(CurrentPerson, neptunePage, treatmentBMPAssessmentObservationTypes);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 9
0
        public ViewResult DelineationReconciliationReport()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.DelineationReconciliationReport);
            var regionalSubbasinsLastUpdated = HttpRequestStorage.DatabaseEntities.RegionalSubbasins.Max(x => x.LastUpdate);
            var viewData = new DelineationReconciliationReportViewData(CurrentPerson, neptunePage, regionalSubbasinsLastUpdated);

            return(RazorView <DelineationReconciliationReport, DelineationReconciliationReportViewData>(viewData));
        }
Exemplo n.º 10
0
        public ViewResult Index()
        {
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.LandUseBlock);
            var landUseBlockBulkUploadUrl = SitkaRoute <LandUseBlockUploadController> .BuildUrlFromExpression(x => x.UpdateLandUseBlockGeometry());

            var viewData = new IndexViewData(CurrentPerson, neptunePage, landUseBlockBulkUploadUrl);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 11
0
        private ActionResult ViewInvite(InviteViewModel viewModel)
        {
            var neptunePage   = NeptunePage.GetNeptunePageByPageType(NeptunePageType.InviteUser);
            var organizations = HttpRequestStorage.DatabaseEntities.Organizations.OrderBy(x => x.OrganizationName).ToList();
            var cancelUrl     = Request.UrlReferrer != null?Request.UrlReferrer.ToString() : SitkaRoute <HomeController> .BuildUrlFromExpression(x => x.Index());

            var viewData = new InviteViewData(CurrentPerson, organizations, neptunePage, cancelUrl);

            return(RazorView <Invite, InviteViewData, InviteViewModel>(viewData, viewModel));
        }
Exemplo n.º 12
0
        public ViewResult Training()
        {
            var neptunePageTypeTraining       = NeptunePageType.Training;
            var neptunePageByPageTypeHomePage = NeptunePage.GetNeptunePageByPageType(neptunePageTypeTraining);
            var trainingVideos = HttpRequestStorage.DatabaseEntities.TrainingVideos.ToList();

            var viewData = new TrainingViewData(CurrentPerson, neptunePageByPageTypeHomePage, trainingVideos);

            return(RazorView <Training, TrainingViewData>(viewData));
        }
        public ViewResult Index()
        {
            var neptunePage             = NeptunePage.GetNeptunePageByPageType(NeptunePageType.WaterQualityMaintenancePlan);
            var wqmpGridSpec            = new WaterQualityManagementPlanIndexGridSpec(CurrentPerson);
            var verificationNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.WaterQualityMaintenancePlanOandMVerifications);
            var verificationGridSpec    = new WaterQualityManagementPlanVerificationGridSpec(CurrentPerson);
            var viewData = new IndexViewData(CurrentPerson, neptunePage, wqmpGridSpec, verificationNeptunePage, verificationGridSpec);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 14
0
        private ViewResult ViewEdit(EditViewModel viewModel, CustomAttributeType customAttributeType)
        {
            var instructionsNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageCustomAttributeTypeInstructions);
            var customAttributeInstructionsNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageCustomAttributeInstructions);

            var submitUrl = ModelObjectHelpers.IsRealPrimaryKeyValue(viewModel.CustomAttributeTypeID) ? SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(x => x.Edit(viewModel.CustomAttributeTypeID)) : SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(x => x.New());

            var viewData = new EditViewData(CurrentPerson, MeasurementUnitType.All, CustomAttributeDataType.All, submitUrl, instructionsNeptunePage, customAttributeInstructionsNeptunePage, customAttributeType);

            return(RazorView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
Exemplo n.º 15
0
        public ViewResult Index()
        {
            var neptunePage          = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManagerDashboard);
            var fieldVisitCount      = HttpRequestStorage.DatabaseEntities.vFieldVisitDetaileds.GetProvisionalFieldVisits(CurrentPerson).Count;
            var treatmentBMPsCount   = HttpRequestStorage.DatabaseEntities.TreatmentBMPs.GetProvisionalTreatmentBMPs(CurrentPerson).Count;
            var bmpDelineationsCount = HttpRequestStorage.DatabaseEntities.Delineations
                                       .GetProvisionalBMPDelineations(CurrentPerson).Count;
            var viewData = new IndexViewData(CurrentPerson, neptunePage, fieldVisitCount, treatmentBMPsCount, bmpDelineationsCount);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 16
0
        private ViewResult ViewEdit(EditViewModel viewModel, TreatmentBMPAssessmentObservationType treatmentBMPAssessmentObservationType)
        {
            var instructionsNeptunePage              = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeInstructions);
            var observationInstructionsNeptunePage   = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeObservationInstructions);
            var labelAndUnitsInstructionsNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageObservationTypeLabelsAndUnitsInstructions);

            var submitUrl = ModelObjectHelpers.IsRealPrimaryKeyValue(viewModel.TreatmentBMPAssessmentObservationTypeID) ? SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.Edit(viewModel.TreatmentBMPAssessmentObservationTypeID)) : SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.New());

            var viewData = new EditViewData(CurrentPerson, MeasurementUnitType.All, ObservationTypeSpecification.All, ObservationThresholdType.All, ObservationTargetType.All, ObservationTypeCollectionMethod.All.ToList(), submitUrl, instructionsNeptunePage, observationInstructionsNeptunePage, labelAndUnitsInstructionsNeptunePage, treatmentBMPAssessmentObservationType);

            return(RazorView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
Exemplo n.º 17
0
        private ViewResult ViewEdit(EditViewModel viewModel, TreatmentBMPType treatmentBMPType)
        {
            var instructionsNeptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ManageTreatmentBMPTypeInstructions);
            var submitUrl = ModelObjectHelpers.IsRealPrimaryKeyValue(viewModel.TreatmentBMPTypeID) ? SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(x => x.Edit(viewModel.TreatmentBMPTypeID)) : SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(x => x.New());

            var observationTypes     = treatmentBMPType?.TreatmentBMPTypeAssessmentObservationTypes.ToList() ?? new List <TreatmentBMPTypeAssessmentObservationType>();
            var customAttributeTypes = treatmentBMPType?.TreatmentBMPTypeCustomAttributeTypes.ToList() ?? new List <TreatmentBMPTypeCustomAttributeType>();
            var allTreatmentBMPAssessmentObservationTypes = HttpRequestStorage.DatabaseEntities.TreatmentBMPAssessmentObservationTypes.ToList();
            var allCustomAttributeTypes = HttpRequestStorage.DatabaseEntities.CustomAttributeTypes.ToList();
            var viewData = new EditViewData(CurrentPerson, observationTypes, submitUrl, instructionsNeptunePage, treatmentBMPType, customAttributeTypes, allTreatmentBMPAssessmentObservationTypes, allCustomAttributeTypes);

            return(RazorView <Edit, EditViewData, EditViewModel>(viewData, viewModel));
        }
Exemplo n.º 18
0
        public IndexViewData(Person currentPerson, NeptunePage neptunePage, MapInitJson ovtaBasedMapInitJson,
                             MapInitJson areaBasedMapInitJson, MapInitJson loadBasedMapInitJson,
                             IEnumerable <Models.TreatmentBMP> treatmentBMPs, List <TrashCaptureStatusType> trashCaptureStatusTypes,
                             List <Models.Parcel> parcels, List <StormwaterJurisdiction> stormwaterJurisdictions,
                             FeatureCollection geoJsonForJurisdictions) : base(currentPerson, neptunePage)
        {
            OVTABasedMapInitJson = ovtaBasedMapInitJson;
            AreaBasedMapInitJson = areaBasedMapInitJson;
            LoadBasedMapInitJson = loadBasedMapInitJson;

            var stormwaterJurisdictionIDs = stormwaterJurisdictions.Select(x => x.StormwaterJurisdictionID).ToList();

            StormwaterJurisdictionCQLFilter =
                currentPerson.GetStormwaterJurisdictionCqlFilter(stormwaterJurisdictionIDs);
            NegativeStormwaterJurisdictionCQLFilter =
                currentPerson.GetNegativeStormwaterJurisdictionCqlFilter(stormwaterJurisdictionIDs);
            JurisdictionSelectList = stormwaterJurisdictions.OrderBy(x => x.GetOrganizationDisplayName())
                                     .ToSelectList(x => x.StormwaterJurisdictionID.ToString(CultureInfo.InvariantCulture),
                                                   x => x.GetOrganizationDisplayName());
            var showDropdown = stormwaterJurisdictions.Count > 1;
            var currentUserIsAnonymousOrUnassigned = CurrentPerson.IsAnonymousOrUnassigned();

            ViewDataForAngular = new ViewDataForAngularClass(ovtaBasedMapInitJson, areaBasedMapInitJson,
                                                             loadBasedMapInitJson,
                                                             treatmentBMPs, trashCaptureStatusTypes, parcels, StormwaterJurisdictionCQLFilter, showDropdown,
                                                             NegativeStormwaterJurisdictionCQLFilter, geoJsonForJurisdictions, currentUserIsAnonymousOrUnassigned);
            EntityName  = "Trash Module";
            PageTitle   = "Welcome";
            AllOVTAsUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildAbsoluteUrlHttpsFromExpression(x => x.Index(),
                                                                                                        NeptuneWebConfiguration.CanonicalHostName);

            FindBMPUrl = SitkaRoute <TreatmentBMPController> .BuildAbsoluteUrlHttpsFromExpression(x => x.FindABMP(),
                                                                                                  NeptuneWebConfiguration.CanonicalHostName);

            BeginOVTAUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildAbsoluteUrlHttpsFromExpression(x =>
                                                                                                        x.Instructions(null),
                                                                                                        NeptuneWebConfiguration.CanonicalHostName);

            AddBMPUrl = SitkaRoute <TreatmentBMPController> .BuildAbsoluteUrlHttpsFromExpression(x => x.New(),
                                                                                                 NeptuneWebConfiguration.CanonicalHostName);

            RefreshTguUrl = SitkaRoute <HomeController> .BuildUrlFromExpression(x => x.RefreshTrashGeneratingUnits());

            ScoreDescriptionsUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.ScoreDescriptions());

            ProgramOverviewPageContentViewData = new ViewPageContentViewData(
                NeptunePage.GetNeptunePageByPageType(NeptunePageType.TrashModuleProgramOverview), currentPerson);
        }
Exemplo n.º 19
0
        public IndexViewData(Person currentPerson) : base(currentPerson, NeptunePage.GetNeptunePageByPageType(NeptunePageType.HRUCharacteristics))

        {
            RefreshUrl =
                SitkaRoute <HRUCharacteristicController> .BuildUrlFromExpression(x => x.RefreshHRUCharacteristics());

            HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson);
            EntityName          = "HRU Characteristics";
            PageTitle           = "Index";
            GridSpec            = new HRUCharacteristicGridSpec()
            {
                ObjectNameSingular = "HRU Characteristic", ObjectNamePlural = "HRU Characteristics", SaveFiltersInCookie = true
            };
            GridName    = "HRUCharacteristics";
            GridDataUrl = SitkaRoute <HRUCharacteristicController> .BuildUrlFromExpression(j => j.HRUCharacteristicGridJsonData());
        }
Exemplo n.º 20
0
        private ViewResult ViewSupportImpl(SupportFormViewModel viewModel, string successMessage)
        {
            var allSupportRequestTypes = SupportRequestType.All.OrderBy(x => x.SupportRequestTypeSortOrder).ToList();

            var supportRequestTypes =
                allSupportRequestTypes.OrderBy(x => x.SupportRequestTypeSortOrder)
                .ToSelectListWithEmptyFirstRow(x => x.SupportRequestTypeID.ToString(CultureInfo.InvariantCulture), x => x.SupportRequestTypeDisplayName);
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.RequestSupport);
            var cancelUrl   = Request.UrlReferrer != null?Request.UrlReferrer.ToString() : SitkaRoute <HomeController> .BuildUrlFromExpression(x => x.Index());

            viewModel.ReturnUrl = cancelUrl;
            // ReSharper disable once ConditionIsAlwaysTrueOrFalse
            var viewData = new SupportFormViewData(CurrentPerson, neptunePage, successMessage, IsCurrentUserAnonymous(), supportRequestTypes, allSupportRequestTypes.Select(x => new SupportRequestTypeSimple(x)).ToList(), cancelUrl);

            return(RazorView <SupportForm, SupportFormViewData, SupportFormViewModel>(viewData, viewModel));
        }
Exemplo n.º 21
0
        public ViewResult Index()
        {
            var stormwaterJurisdictionsPersonCanView = CurrentPerson.GetStormwaterJurisdictionsPersonCanView().ToList();

            if (!stormwaterJurisdictionsPersonCanView.Any())
            {
                throw new SitkaRecordNotAuthorizedException(
                          "You are not assigned to any Jurisdictions. Please log out and log in as a different user or request additional permissions");
            }

            var stormwaterJurisdictionIDsPersonCanView = stormwaterJurisdictionsPersonCanView.Select(x => x.StormwaterJurisdictionID);
            var treatmentBmps            = CurrentPerson.GetTreatmentBmpsPersonCanView();
            var treatmentBMPLayerGeoJson = new LayerGeoJson("Treatment BMPs", treatmentBmps.ToGeoJsonFeatureCollectionForTrashMap(), "blue", 1, LayerInitialVisibility.Show)
            {
                EnablePopups = false
            };

            var parcels = HttpRequestStorage.DatabaseEntities.Parcels.Include(x => x.WaterQualityManagementPlanParcels).Include(x => x.WaterQualityManagementPlanParcels.Select(y => y.WaterQualityManagementPlan)).Where(x => x.WaterQualityManagementPlanParcels.Any()).ToList();

            var parcelLayerGeoJson = new LayerGeoJson("Parcels", parcels.ToGeoJsonFeatureCollectionForTrashMap(), "blue", 1, LayerInitialVisibility.Show)
            {
                EnablePopups = false
            };

            var boundingBox = BoundingBox.GetBoundingBox(stormwaterJurisdictionsPersonCanView);
            var geoJsonForJurisdictions = StormwaterJurisdiction.ToGeoJsonFeatureCollection(stormwaterJurisdictionsPersonCanView);
            var jurisdictionLayersGeoJson = new List <LayerGeoJson> {
                new LayerGeoJson(MapInitJsonHelpers.CountyCityLayerName, geoJsonForJurisdictions, "#FF6C2D", 0m, LayerInitialVisibility.Hide)
            }.ToList(); var ovtaBasedMapInitJson = new TrashModuleMapInitJson("ovtaBasedResultsMap", treatmentBMPLayerGeoJson, parcelLayerGeoJson, boundingBox, jurisdictionLayersGeoJson)

            {
                LayerControlClass = "ovta-based-map-layer-control"
            };
            var areaBasedMapInitJson = new StormwaterMapInitJson("areaBasedResultsMap", boundingBox, jurisdictionLayersGeoJson)
            {
                LayerControlClass = "area-based-map-layer-control"
            };
            var loadBasedMapInitJson = new StormwaterMapInitJson("loadBasedResultsMap", boundingBox, jurisdictionLayersGeoJson)
            {
                LayerControlClass = "load-based-map-layer-control"
            };
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.TrashHomePage);
            var viewData    = new IndexViewData(CurrentPerson, neptunePage, ovtaBasedMapInitJson, areaBasedMapInitJson,
                                                loadBasedMapInitJson, treatmentBmps, TrashCaptureStatusType.All, parcels, stormwaterJurisdictionsPersonCanView, geoJsonForJurisdictions);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 22
0
        public ViewResult Index()
        {
            var layerGeoJsons = HttpRequestStorage.DatabaseEntities.StormwaterJurisdictions.GetBoundaryLayerGeoJson(true)
                                .Where(x => x.LayerInitialVisibility == LayerInitialVisibility.Show)
                                .ToList();

            var projectLocationsMapInitJson = new JurisdictionsMapInitJson("JurisdictionsMap")
            {
                AllowFullScreen = false,
                Layers          = layerGeoJsons
            };
            var projectLocationsMapViewData = new JurisdictionsMapViewData(projectLocationsMapInitJson.MapDivID);

            var           neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ModelingHomePage);
            IndexViewData viewData    = new IndexViewData(CurrentPerson, neptunePage, projectLocationsMapViewData, projectLocationsMapInitJson);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 23
0
        public ViewResult RequestOrganizationNameChange()
        {
            var currentPageUrl = string.Empty;

            if (Request.UrlReferrer != null)
            {
                currentPageUrl = Request.UrlReferrer.ToString();
            }
            else if (Request.Url != null)
            {
                currentPageUrl = Request.Url.ToString();
            }

            var viewModel = new SupportFormViewModel(currentPageUrl, SupportRequestTypeEnum.RequestOrganizationNameChange);

            if (!IsCurrentUserAnonymous())
            {
                viewModel.RequestPersonName  = CurrentPerson.GetFullNameFirstLast();
                viewModel.RequestPersonEmail = CurrentPerson.Email;
                if (CurrentPerson.Organization != null)
                {
                    viewModel.RequestPersonOrganization = CurrentPerson.Organization.OrganizationName;
                }
                viewModel.RequestPersonPhone = CurrentPerson.Phone;
            }
            viewModel.RequestDescription = string.Empty;
            var allSupportRequestTypes = SupportRequestType.All.OrderBy(x => x.SupportRequestTypeSortOrder).ToList();

            var supportRequestTypes =
                allSupportRequestTypes.OrderBy(x => x.SupportRequestTypeSortOrder)
                .ToSelectListWithEmptyFirstRow(x => x.SupportRequestTypeID.ToString(CultureInfo.InvariantCulture), x => x.SupportRequestTypeDisplayName);
            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.RequestSupport);
            var cancelUrl   = Request.UrlReferrer != null?Request.UrlReferrer.ToString() : SitkaRoute <HomeController> .BuildUrlFromExpression(x => x.Index());

            viewModel.ReturnUrl = cancelUrl;
            // ReSharper disable once ConditionIsAlwaysTrueOrFalse
            var viewData = new SupportFormViewData(CurrentPerson, neptunePage, string.Empty, IsCurrentUserAnonymous(), supportRequestTypes, allSupportRequestTypes.Select(x => new SupportRequestTypeSimple(x)).ToList(), cancelUrl);

            return(RazorView <Views.Help.RequestOrganizationNameChange, SupportFormViewData, SupportFormViewModel>(viewData, viewModel));
        }
Exemplo n.º 24
0
        public ViewResult Index()
        {
            var neptunePageTypeHomePage       = NeptunePageType.HomePage;
            var neptunePageByPageTypeHomePage = NeptunePage.GetNeptunePageByPageType(neptunePageTypeHomePage);

            var neptunePageTypeHomePageAdditionalInfo       = NeptunePageType.HomeAdditionalInfo;
            var neptunePageByPageTypeHomePageAdditionalInfo = NeptunePage.GetNeptunePageByPageType(neptunePageTypeHomePageAdditionalInfo);

            var neptunePageTypeHomePageMapInfo       = NeptunePageType.HomeMapInfo;
            var neptunePageByPageTypeHomePageMapInfo = NeptunePage.GetNeptunePageByPageType(neptunePageTypeHomePageMapInfo);

            var neptuneHomePageImages = HttpRequestStorage.DatabaseEntities.NeptuneHomePageImages.ToList().OrderBy(x => x.SortOrder).ToList();

            // map stuff

            var layerGeoJsons = HttpRequestStorage.DatabaseEntities.StormwaterJurisdictions.GetBoundaryLayerGeoJson(true)
                                .Where(x => x.LayerInitialVisibility == LayerInitialVisibility.Show)
                                .ToList();

            var projectLocationsMapInitJson = new JurisdictionsMapInitJson("JurisdictionsMap")
            {
                AllowFullScreen = false,
                Layers          = layerGeoJsons
            };
            var projectLocationsMapViewData = new JurisdictionsMapViewData(projectLocationsMapInitJson.MapDivID);

            var launchPadNeptunePage        = NeptunePage.GetNeptunePageByPageType(NeptunePageType.LaunchPad);
            var numberOfBmpTypes            = HttpRequestStorage.DatabaseEntities.TreatmentBMPTypes.Count();
            var managerDashboardDescription = GetManagerDashboardDescription();
            var launchPadViewData           = new LaunchPadViewData(CurrentPerson, launchPadNeptunePage, numberOfBmpTypes, managerDashboardDescription);

            var viewData = new IndexViewData(CurrentPerson, neptunePageByPageTypeHomePage,
                                             neptunePageByPageTypeHomePageAdditionalInfo, neptunePageByPageTypeHomePageMapInfo,
                                             neptuneHomePageImages, projectLocationsMapViewData, projectLocationsMapInitJson,
                                             launchPadViewData);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 25
0
        public ActionResult Index()
        {
            var neptunePageHome        = NeptunePage.GetNeptunePageByPageType(NeptunePageType.ParcelList);
            var findParcelByAddressUrl = SitkaRoute <ParcelController> .BuildUrlFromExpression(x => x.FindByAddress(null));

            var findParcelByAPNUrl = SitkaRoute <ParcelController> .BuildUrlFromExpression(x => x.FindByAPN(null));

            var parcelMapServiceUrl    = NeptuneWebConfiguration.ParcelMapServiceUrl;
            var parcelSummaryForMapUrl = SitkaRoute <ParcelController> .BuildUrlFromExpression(x => x.SummaryForMap(null));

            var mapInitJson = GetMapInitJson();

            var viewData = new IndexViewData(CurrentPerson,
                                             neptunePageHome,
                                             neptunePageHome.NeptunePageContentHtmlString,
                                             mapInitJson,
                                             findParcelByAddressUrl,
                                             findParcelByAPNUrl,
                                             parcelMapServiceUrl,
                                             parcelSummaryForMapUrl);

            return(RazorView <Index, IndexViewData>(viewData));
        }
Exemplo n.º 26
0
        public ViewResult DelineationMap(int?treatmentBMPID)
        {
            var treatmentBMP = treatmentBMPID.HasValue
                ? HttpRequestStorage.DatabaseEntities.TreatmentBMPs.GetTreatmentBMP(
                treatmentBMPID.Value)
                : null;

            if (treatmentBMP != null)
            {
                var permissionCheckResult = new TreatmentBMPEditFeature().HasPermission(CurrentPerson, treatmentBMP);
                Check.Assert(permissionCheckResult.HasPermission, permissionCheckResult.PermissionDeniedMessage);
            }

            var neptunePage = NeptunePage.GetNeptunePageByPageType(NeptunePageType.DelineationMap);
            var stormwaterJurisdictionsPersonCanView   = CurrentPerson.GetStormwaterJurisdictionsPersonCanView().ToList();
            var stormwaterJurisdictionIDsPersonCanView = stormwaterJurisdictionsPersonCanView.Select(x => x.StormwaterJurisdictionID);
            var treatmentBMPs          = HttpRequestStorage.DatabaseEntities.TreatmentBMPs.Include(x => x.Delineations).Where(x => stormwaterJurisdictionIDsPersonCanView.Contains(x.StormwaterJurisdictionID)).ToList();
            var delineationMapInitJson = new DelineationMapInitJson("delineationMap", treatmentBMPs, BoundingBox.GetBoundingBox(stormwaterJurisdictionsPersonCanView));
            var bulkUploadTreatmentBMPDelineationsUrl = SitkaRoute <DelineationUploadController> .BuildUrlFromExpression(x => x.UpdateDelineationGeometry());

            var viewData = new DelineationMapViewData(CurrentPerson, neptunePage, delineationMapInitJson, treatmentBMP, bulkUploadTreatmentBMPDelineationsUrl);

            return(RazorView <DelineationMap, DelineationMapViewData>(viewData));
        }
Exemplo n.º 27
0
 public ModelingModuleViewData(Person currentPerson, NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.Modeling)
 {
     MakeTrashModuleMenu();
 }
Exemplo n.º 28
0
 public OVTASectionViewData(Person currentPerson, NeptunePage neptunePage, Models.OVTASection ovtaSection, Models.OnlandVisualTrashAssessment ovta) : base(currentPerson, neptunePage)
 {
     AssignParameters(ovtaSection, ovta);
 }
Exemplo n.º 29
0
 public InstructionsViewData(Person currentPerson, NeptunePage neptunePage, Models.OnlandVisualTrashAssessment ovta)
     : base(currentPerson, neptunePage, Models.OVTASection.Instructions, ovta)
 {
 }
Exemplo n.º 30
0
 public ViewResult BulkUploadRequest()
 {
     return(RazorView <BulkUploadRequest, BulkUploadRequestViewData>(
                new BulkUploadRequestViewData(CurrentPerson, NeptunePage.GetNeptunePageByPageType(NeptunePageType.BulkUploadRequest))));
 }