public DetailViewData(Person currentPerson, Models.TreatmentBMPType treatmentBMPType) : base(currentPerson, NeptuneArea.OCStormwaterTools) { CurrentPersonIsAnonymousOrUnassigned = currentPerson.IsAnonymousOrUnassigned(); TreatmentBMPType = treatmentBMPType; EntityName = FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized(); PageTitle = treatmentBMPType.TreatmentBMPTypeName; var showDelete = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); var showEdit = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); GridSpec = new TreatmentBMPsInTreatmentBMPTypeGridSpec(currentPerson, showDelete, showEdit, treatmentBMPType) { ObjectNameSingular = "Treatment BMP", ObjectNamePlural = "Treatment BMPs", SaveFiltersInCookie = true }; GridName = "treatmentBMPsGrid"; GridDataUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(j => j.TreatmentBMPsInTreatmentBMPTypeGridJsonData(treatmentBMPType)); UserHasTreatmentBMPTypeManagePermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); EntityUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(c => c.Index()); ObservationTypeSortOrderUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(x => x.EditObservationTypesSortOrder(TreatmentBMPType)); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, int treatmentBmpsInExportCount, int featureClassesInExportCount, string bulkBMPUploadUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { TreatmentBmpsInExportCount = treatmentBmpsInExportCount; FeatureClassesInExportCount = featureClassesInExportCount; PageTitle = "All Treatment BMPs"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; var showDelete = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); var showEdit = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); GridSpec = new TreatmentBMPGridSpec(currentPerson, showDelete, showEdit) { ObjectNameSingular = "Treatment BMP", ObjectNamePlural = "Treatment BMPs", SaveFiltersInCookie = true }; GridName = "treatmentBMPsGrid"; GridDataUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(j => j.TreatmentBMPGridJsonData()); NewUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.New()); BulkBMPUploadUrl = bulkBMPUploadUrl; HasEditPermissions = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); DownloadBMPInventoryUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.BMPInventoryExport()); RefreshLSPCBasinsUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.RefreshLSPCBasinsFromOCSurvey()); RefreshPrecipitationZonesUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.RefreshPrecipitationZonesFromOCSurvey()); }
public DetailViewData(Person currentPerson, Models.TreatmentBMPAssessmentObservationType treatmentBMPAssessmentObservationType) : base(currentPerson, NeptuneArea.OCStormwaterTools) { TreatmentBMPAssessmentObservationType = treatmentBMPAssessmentObservationType; EntityName = "Observation Type"; EntityUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(c => c.Index()); PageTitle = TreatmentBMPAssessmentObservationType.TreatmentBMPAssessmentObservationTypeName; UserHasObservationTypeManagePermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); ViewSchemaDetailUrl = TreatmentBMPAssessmentObservationType.ObservationTypeSpecification.ObservationTypeCollectionMethod.ViewSchemaDetailUrl(TreatmentBMPAssessmentObservationType); TreatmentBMPTypeGridSpec = new TreatmentBMPTypeGridSpec(currentPerson) { ObjectNameSingular = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true }; TreatmentBMPTypeGridName = "treatmentBMPTypeGridForObservationType"; TreatmentBMPTypeGridDataUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(tc => tc.TreatmentBMPTypeGridJsonData(TreatmentBMPAssessmentObservationType)); ViewModelForPreview = new EditViewModel(treatmentBMPAssessmentObservationType); PreviewUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.PreviewObservationType()); }
public IndexViewData(Person currentPerson, MapInitJson mapInitJson, string geoServerUrl, string regionalSubbasinLayerName) : base(currentPerson, NeptuneArea.OCStormwaterTools) { MapInitJson = mapInitJson; GeoServerUrl = geoServerUrl; RegionalSubbasinLayerName = regionalSubbasinLayerName; EntityName = "Regional Subbasins"; PageTitle = "All Regional Subbasins"; HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); RefreshUrl = SitkaRoute <RegionalSubbasinController> .BuildUrlFromExpression(j => j.RefreshFromOCSurvey()); }
public IndexViewData(Person currentPerson, RegionalSubbasinRevisionRequestGridSpec gridSpec) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = "Regional Subbasin Revision Requests"; PageTitle = "Index"; GridSpec = gridSpec; HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); GridName = "rsbRevisionRequestsGrid"; GridDataUrl = SitkaRoute <RegionalSubbasinRevisionRequestController> .BuildUrlFromExpression(x => x.RegionalSubbasinRevisionRequestGridJsonData()); RefreshUrl = SitkaRoute <RegionalSubbasinController> .BuildUrlFromExpression(j => j.RefreshFromOCSurvey()); }
public GridViewData(Person currentPerson) : base(currentPerson, Models.NeptunePage.GetNeptunePageByPageType(NeptunePageType.RegionalSubbasins), NeptuneArea.OCStormwaterTools) { EntityName = "Regional Subbasins"; PageTitle = "Grid"; GridSpec = new RegionalSubbasinGridSpec() { ObjectNameSingular = "Regional Subbasin", ObjectNamePlural = "Regional Subbasins", SaveFiltersInCookie = true }; GridName = "absoluteUnitsGrid"; GridDataUrl = SitkaRoute <RegionalSubbasinController> .BuildUrlFromExpression(j => j.RegionalSubbasinGridJsonData()); HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); RefreshUrl = SitkaRoute <RegionalSubbasinController> .BuildUrlFromExpression(j => j.RefreshFromOCSurvey()); }
public DetailViewData(Person currentPerson, Models.FieldVisit fieldVisit, AssessmentDetailViewData initialAssessmentViewData, AssessmentDetailViewData postMaintenanceAssessmentViewData) : base(currentPerson, NeptuneArea.OCStormwaterTools) { FieldVisit = fieldVisit; MaintenanceRecord = FieldVisit.MaintenanceRecord; InitialAssessmentViewData = initialAssessmentViewData; PostMaintenanceAssessmentViewData = postMaintenanceAssessmentViewData; EntityName = "Treatment BMP Field Visits"; EntityUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.Index()); SubEntityName = FieldVisit.TreatmentBMP.TreatmentBMPName ?? "Preview Treatment BMP Field Visit"; SubEntityUrl = FieldVisit.TreatmentBMP?.GetDetailUrl() ?? "#"; PageTitle = FieldVisit.VisitDate.ToStringDate(); InitialAssessment = FieldVisit.GetAssessmentByType(TreatmentBMPAssessmentTypeEnum.Initial); UserCanDeleteInitialAssessment = InitialAssessment != null && new TreatmentBMPAssessmentManageFeature() .HasPermission(currentPerson, InitialAssessment) .HasPermission; PostMaintenanceAssessment = FieldVisit.GetAssessmentByType(TreatmentBMPAssessmentTypeEnum.PostMaintenance); UserCanDeletePostMaintenanceAssessment = PostMaintenanceAssessment != null && new TreatmentBMPAssessmentManageFeature() .HasPermission(currentPerson, PostMaintenanceAssessment) .HasPermission; UserCanDeleteMaintenanceRecord = MaintenanceRecord != null && new MaintenanceRecordManageFeature() .HasPermission(currentPerson, MaintenanceRecord) .HasPermission; SortedMaintenanceRecordObservations = MaintenanceRecord?.MaintenanceRecordObservations.ToList() .OrderBy(x => x.TreatmentBMPTypeCustomAttributeType.SortOrder) .ThenBy(x => x.TreatmentBMPTypeCustomAttributeType.GetDisplayName()); UserHasCustomAttributeTypeManagePermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); CanManageStormwaterJurisdiction = currentPerson.CanManageStormwaterJurisdiction(fieldVisit.TreatmentBMP.StormwaterJurisdictionID); CanEditStormwaterJurisdiction = currentPerson.IsAssignedToStormwaterJurisdiction(fieldVisit.TreatmentBMP.StormwaterJurisdictionID); VerifiedUnverifiedFieldVisitUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.VerifyFieldVisit(FieldVisit.PrimaryKey)); MarkAsProvisionalUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.MarkProvisionalFieldVisit(FieldVisit.PrimaryKey)); ReturnToEditUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.ReturnFieldVisitToEdit(FieldVisit.PrimaryKey)); }
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()); }
public DetailViewData(Person currentPerson, Person personToView, UserNotificationGridSpec userNotificationGridSpec, string userNotificationGridName, string userNotificationGridDataUrl, string activateInactivateUrl) : base(currentPerson, NeptuneArea.OCStormwaterTools) { Person = personToView; PageTitle = personToView.GetFullNameFirstLast() + (!personToView.IsActive ? " (inactive)" : string.Empty); EntityName = "Users"; //TODO: This gets pulled up to root EditPersonOrganizationPrimaryContactUrl = SitkaRoute <PersonOrganizationController> .BuildUrlFromExpression(c => c.EditPersonOrganizationPrimaryContacts(personToView)); IndexUrl = SitkaRoute <UserController> .BuildUrlFromExpression(x => x.Index()); JurisdictionIndexUrl = SitkaRoute <JurisdictionController> .BuildUrlFromExpression(x => x.Index()); UserHasPersonViewPermissions = new UserViewFeature().HasPermission(currentPerson, personToView).HasPermission; UserCanManageThisPersonPermissions = new UserEditRoleFeature().HasPermission(currentPerson, personToView).HasPermission; UserCanManagePeople = new UserEditFeature().HasPermissionByPerson(currentPerson); UserIsAdmin = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); UserHasViewEverythingPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); if (UserCanManagePeople) { EntityUrl = IndexUrl; } IsViewingSelf = currentPerson != null && currentPerson.PersonID == personToView.PersonID; EditRolesLink = UserCanManageThisPersonPermissions ? ModalDialogFormHelper.MakeEditIconLink(SitkaRoute <UserController> .BuildUrlFromExpression(c => c.EditRoles(personToView)), $"Edit Roles for User - {personToView.GetFullNameFirstLast()}", true) : new HtmlString(string.Empty); EditJurisdictionsLink = UserCanManageThisPersonPermissions ? ModalDialogFormHelper.MakeEditIconLink(SitkaRoute <UserController> .BuildUrlFromExpression(c => c.EditJurisdiction(personToView)), $"Edit Assigned Jurisdictions for User - {personToView.GetFullNameFirstLast()}", true) : new HtmlString(string.Empty); UserNotificationGridSpec = userNotificationGridSpec; UserNotificationGridName = userNotificationGridName; UserNotificationGridDataUrl = userNotificationGridDataUrl; ActivateInactivateUrl = activateInactivateUrl; }
private static ImageGalleryViewData BuildImageGalleryViewData(Person currentPerson) { var userCanAddPhotosToHomePage = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); var newPhotoForProjectUrl = SitkaRoute <NeptuneHomePageImageController> .BuildUrlFromExpression(x => x.New()); var galleryName = "HomePageImagesGallery"; var neptuneHomePageImages = HttpRequestStorage.DatabaseEntities.NeptuneHomePageImages.ToList(); var imageGalleryViewData = new ImageGalleryViewData(currentPerson, galleryName, neptuneHomePageImages, userCanAddPhotosToHomePage, newPhotoForProjectUrl, true, x => x.GetCaptionOnFullView(), "Photo"); return(imageGalleryViewData); }
public LaunchPadViewData(Person currentPerson, Models.NeptunePage launchPadNeptunePage, int numberOfBmpTypes, string managerDashboardDescription) { CurrentPerson = currentPerson; IsLoggedIn = !CurrentPerson.IsAnonymousUser(); IsAdmin = new NeptuneAdminFeature().HasPermissionByPerson(CurrentPerson); IsUnassigned = !CurrentPerson.IsAnonymousUser() && CurrentPerson.Role == Models.Role.Unassigned; IsJurisdictionManager = new JurisdictionManageFeature().HasPermissionByPerson(CurrentPerson); Jurisdictions = CurrentPerson.StormwaterJurisdictionPeople.Select(x => x.StormwaterJurisdiction).ToList(); NumberOfBmpTypes = numberOfBmpTypes; ManagerDashboardDescription = managerDashboardDescription; LaunchPadViewPageContentViewData = new ViewPageContentViewData(launchPadNeptunePage, CurrentPerson); JurisdictionIndexUrl = SitkaRoute <JurisdictionController> .BuildUrlFromExpression(c => c.Index()); RequestSupportUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(c => c.RequestToChangePrivileges()); FindABmpUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(c => c.FindABMP()); ExploreBmpTypesUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(c => c.Index()); AddABmpUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(c => c.New()); ViewAssessmentAndMaintenanceRecordsUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(c => c.Index()); ViewWaterQualityManagementPlansUrl = SitkaRoute <WaterQualityManagementPlanController> .BuildUrlFromExpression(c => c.Index()); FieldFieldVisitsUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(c => c.Index()); InviteANewUserUrl = SitkaRoute <UserController> .BuildUrlFromExpression(c => c.Invite()); EditUserRolesUrl = SitkaRoute <UserController> .BuildUrlFromExpression(c => c.Index()); AddAFundingSourceUrl = SitkaRoute <FundingSourceController> .BuildUrlFromExpression(c => c.Index()); ManagerDashboardUrl = SitkaRoute <ManagerDashboardController> .BuildUrlFromExpression(c => c.Index()); ViewDelineationReconciliationReportUrl = SitkaRoute <DelineationController> .BuildUrlFromExpression(c => c.DelineationReconciliationReport()); }
public DetailViewData(Person currentPerson, Models.RegionalSubbasinRevisionRequest regionalSubbasinRevisionRequest, RegionalSubbasinRevisionRequestMapInitJson mapInitJson) : base(currentPerson, NeptuneArea.OCStormwaterTools) { RegionalSubbasinRevisionRequest = regionalSubbasinRevisionRequest; MapInitJson = mapInitJson; GeoServerUrl = NeptuneWebConfiguration.ParcelMapServiceUrl; MapFormID = "revisionRequestHiddenInputContainer"; SubmitUrl = SitkaRoute <RegionalSubbasinRevisionRequestController> .BuildUrlFromExpression(x => x.Detail(regionalSubbasinRevisionRequest)); EntityName = "Regional Subbasin"; PageTitle = "Revision"; EntityUrl = SitkaRoute <RegionalSubbasinRevisionRequestController> .BuildUrlFromExpression(x => x.Index()); CloseUrl = SitkaRoute <RegionalSubbasinRevisionRequestController> .BuildUrlFromExpression(x => x.Close(regionalSubbasinRevisionRequest)); DownloadUrl = SitkaRoute <RegionalSubbasinRevisionRequestController> .BuildUrlFromExpression(x => x.Download(regionalSubbasinRevisionRequest)); CurrentPersonCanClose = new RegionalSubbasinRevisionRequestCloseFeature().HasPermission(currentPerson, regionalSubbasinRevisionRequest).HasPermission; HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); }
public DetailViewData(Person currentPerson, Models.CustomAttributeType customAttributeType) : base(currentPerson, NeptuneArea.OCStormwaterTools) { CustomAttributeType = customAttributeType; EntityName = FieldDefinitionType.CustomAttributeType.GetFieldDefinitionLabelPluralized(); PageTitle = customAttributeType.CustomAttributeTypeName; UserHasCustomAttributeTypeManagePermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); if (UserHasCustomAttributeTypeManagePermissions) { EntityUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(c => c.Manage()); } TreatmentBMPTypeGridSpec = new TreatmentBMPTypeGridSpec(currentPerson) { ObjectNameSingular = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true }; TreatmentBMPTypeGridName = "treatmentBMPTypeGridForAttribute"; TreatmentBMPTypeGridDataUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(tc => tc.TreatmentBMPTypeGridJsonData(customAttributeType)); }
public DetailViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, TreatmentBMPDetailMapInitJson mapInitJson, ImageCarouselViewData imageCarouselViewData, string verifiedUnverifiedUrl, HRUCharacteristicsViewData hruCharacteristicsViewData, string mapServiceUrl, ModeledPerformanceViewData modeledPerformanceViewData) : base(currentPerson, NeptuneArea.OCStormwaterTools) { TreatmentBMP = treatmentBMP; PageTitle = treatmentBMP.TreatmentBMPName; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; EntityUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); MapInitJson = mapInitJson; ImageCarouselViewData = imageCarouselViewData; AddBenchmarkAndThresholdUrl = SitkaRoute <TreatmentBMPBenchmarkAndThresholdController> .BuildUrlFromExpression(x => x.Instructions(treatmentBMP.TreatmentBMPID)); HasSettableBenchmarkAndThresholdValues = TreatmentBMP.HasSettableBenchmarkAndThresholdValues(); CurrentPersonCanManage = new TreatmentBMPManageFeature().HasPermission(currentPerson, TreatmentBMP).HasPermission; CurrentPersonIsAnonymousOrUnassigned = currentPerson.IsAnonymousOrUnassigned(); CanManageStormwaterJurisdiction = currentPerson.CanManageStormwaterJurisdiction(treatmentBMP.StormwaterJurisdictionID); CanEditStormwaterJurisdiction = currentPerson.IsAssignedToStormwaterJurisdiction(treatmentBMP.StormwaterJurisdictionID); UserIsAdmin = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); CanEditBenchmarkAndThresholds = CurrentPersonCanManage && HasSettableBenchmarkAndThresholdValues; FieldVisitGridSpec = new FieldVisitGridSpec(CurrentPerson, true); FieldVisitGridName = "FieldVisit"; FieldVisitGridDataUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.FieldVisitGridJsonData(treatmentBMP)); NewFieldVisitUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.New(treatmentBMP)); NewTreatmentBMPDocumentUrl = SitkaRoute <TreatmentBMPDocumentController> .BuildUrlFromExpression(x => x.New(treatmentBMP)); NewFundingSourcesUrl = SitkaRoute <FundingEventController> .BuildUrlFromExpression(x => x.NewFundingEvent(treatmentBMP)); //This handles an extreme edge case, but a bmp came back without a regional subbasin OtherTreatmentBmpsExistInSubbasin = TreatmentBMP.GetRegionalSubbasin()?.GetTreatmentBMPs().Any(x => x.TreatmentBMPID != TreatmentBMP.TreatmentBMPID) ?? false; EditTreatmentBMPPerformanceAndModelingAttributesUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.EditModelingAttributes(treatmentBMP)); EditTreatmentBMPOtherDesignAttributesUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.EditAttributes(treatmentBMP, CustomAttributeTypePurpose.OtherDesignAttributes)); LocationEditUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.EditLocation(treatmentBMP)); ManageTreatmentBMPImagesUrl = SitkaRoute <TreatmentBMPImageController> .BuildUrlFromExpression(x => x.ManageTreatmentBMPImages(TreatmentBMP)); VerifiedUnverifiedUrl = verifiedUnverifiedUrl; HRUCharacteristicsViewData = hruCharacteristicsViewData; MapServiceUrl = mapServiceUrl; ModeledPerformanceViewData = modeledPerformanceViewData; DelineationArea = (TreatmentBMP.Delineation?.DelineationGeometry.Area * DbSpatialHelper.SquareMetersToAcres)?.ToString("0.00") ?? "-"; DelineationStatus = TreatmentBMP.GetDelineationStatus(); DelineationErrors = CheckForDelineationErrors(treatmentBMP); DisplayTrashCaptureEffectiveness = TreatmentBMP.TrashCaptureStatusTypeID == TrashCaptureStatusType.Partial.TrashCaptureStatusTypeID; TrashCaptureEffectiveness = TreatmentBMP.TrashCaptureEffectiveness == null ? "Not Provided" : TreatmentBMP.TrashCaptureEffectiveness + "%"; DelineationMapUrl = treatmentBMP.GetDelineationMapUrl(); ParameterizationErrors = CheckForParameterizationErrors(treatmentBMP); ChangeTreatmentBMPTypeUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.ConvertTreatmentBMPType(treatmentBMP)); HasModelingAttributes = TreatmentBMP.TreatmentBMPType.TreatmentBMPModelingType != null; FieldDefinitionForAverageDivertedFlowrate = FieldDefinitionType.AverageDivertedFlowrate; FieldDefinitionForAverageTreatmentFlowrate = FieldDefinitionType.AverageTreatmentFlowrate; FieldDefinitionForDesignDryWeatherTreatmentCapacity = FieldDefinitionType.DesignDryWeatherTreatmentCapacity; FieldDefinitionForDesignLowFlowDiversionCapacity = FieldDefinitionType.DesignLowFlowDiversionCapacity; FieldDefinitionForDesignMediaFiltrationRate = FieldDefinitionType.DesignMediaFiltrationRate; FieldDefinitionForDesignResidenceTimeforPermanentPool = FieldDefinitionType.DesignResidenceTimeForPermanentPool; FieldDefinitionForDiversionRate = FieldDefinitionType.DiversionRate; FieldDefinitionForDrawdownTimeforWQDetentionVolume = FieldDefinitionType.DrawdownTimeForWQDetentionVolume; FieldDefinitionForEffectiveFootprint = FieldDefinitionType.EffectiveFootprint; FieldDefinitionForEffectiveRetentionDepth = FieldDefinitionType.EffectiveRetentionDepth; FieldDefinitionForInfiltrationDischargeRate = FieldDefinitionType.InfiltrationDischargeRate; FieldDefinitionForInfiltrationSurfaceArea = FieldDefinitionType.InfiltrationSurfaceArea; FieldDefinitionForMediaBedFootprint = FieldDefinitionType.MediaBedFootprint; FieldDefinitionForMonthsofOperation = FieldDefinitionType.MonthsOperational; FieldDefinitionForPermanentPoolorWetlandVolume = FieldDefinitionType.PermanentPoolOrWetlandVolume; FieldDefinitionForRoutingConfiguration = FieldDefinitionType.RoutingConfiguration; FieldDefinitionForStorageVolumeBelowLowestOutletElevation = FieldDefinitionType.StorageVolumeBelowLowestOutletElevation; FieldDefinitionForSummerHarvestedWaterDemand = FieldDefinitionType.SummerHarvestedWaterDemand; FieldDefinitionForTimeofConcentration = FieldDefinitionType.TimeOfConcentration; FieldDefinitionForDrawdownTimeForDetentionVolume = FieldDefinitionType.DrawdownTimeForDetentionVolume; FieldDefinitionForTotalEffectiveBMPVolume = FieldDefinitionType.TotalEffectiveBMPVolume; FieldDefinitionForTotalEffectiveDrywellBMPVolume = FieldDefinitionType.TotalEffectiveDrywellBMPVolume; FieldDefinitionForTreatmentRate = FieldDefinitionType.TreatmentRate; FieldDefinitionForUnderlyingHydrologicSoilGroupHSG = FieldDefinitionType.UnderlyingHydrologicSoilGroupHSG; FieldDefinitionForUnderlyingInfiltrationRate = FieldDefinitionType.UnderlyingInfiltrationRate; FieldDefinitionForUpstreamBMP = FieldDefinitionType.UpstreamBMP; FieldDefinitionForWaterQualityDetentionVolume = FieldDefinitionType.WaterQualityDetentionVolume; FieldDefinitionForWettedFootprint = FieldDefinitionType.WettedFootprint; FieldDefinitionForWinterHarvestedWaterDemand = FieldDefinitionType.WinterHarvestedWaterDemand; FieldDefinitionForWatershed = FieldDefinitionType.Watershed; FieldDefinitionForDesignStormwaterDepth = FieldDefinitionType.DesignStormwaterDepth; FieldDefinitionForDryWeatherFlowOverride = FieldDefinitionType.DryWeatherFlowOverride; OpenRevisionRequest = TreatmentBMP.RegionalSubbasinRevisionRequests.SingleOrDefault(x => x.RegionalSubbasinRevisionRequestStatus == RegionalSubbasinRevisionRequestStatus.Open); EditUpstreamBMPUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.EditUpstreamBMP(treatmentBMP)); RemoveUpstreamBMPUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.RemoveUpstreamBMP(treatmentBMP)); IsAnalyzedInModelingModule = treatmentBMP.TreatmentBMPType.IsAnalyzedInModelingModule; IsInSOC = treatmentBMP.LSPCBasinID != null; IsFullyParameterized = treatmentBMP.IsFullyParameterized(); }