public EditAttributesViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, CustomAttributeTypePurpose customAttributeTypePurpose, bool isSubForm, bool missingRequiredAttributes) : base(currentPerson, NeptuneArea.OCStormwaterTools) { IsSubForm = isSubForm; MissingRequiredAttributes = missingRequiredAttributes; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; var treatmentBMPIndexUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); EntityUrl = treatmentBMPIndexUrl; SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); PageTitle = $"Edit {FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabel()} Attributes"; ParentDetailUrl = treatmentBMP.GetDetailUrl(); TreatmentBMPTypeCustomAttributeTypes = treatmentBMP.TreatmentBMPType.TreatmentBMPTypeCustomAttributeTypes .Where(x => x.CustomAttributeType.CustomAttributeTypePurposeID == customAttributeTypePurpose.CustomAttributeTypePurposeID) .ToList().SortByOrderThenName().ToList(); }
public ManageTreatmentBMPImagesViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, ManagePhotosWithPreviewViewData managePhotosWithPreviewViewData) : base(currentPerson, NeptuneArea.OCStormwaterTools) { TreatmentBMP = treatmentBMP; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; EntityUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); PageTitle = "Manage Photos"; ManagePhotosWithPreviewViewData = managePhotosWithPreviewViewData; }
public EditMaintenanceRecordViewData(Person currentPerson, List <Models.Organization> organizations, Models.TreatmentBMP treatmentBMP, bool isNew, Models.FieldVisit fieldVisit, EditAttributesViewData editMaintenanceRecordObservationsViewData) : base(currentPerson, fieldVisit, Models.FieldVisitSection.Maintenance) { SubsectionName = "Edit Maintenance Record"; IsNew = isNew; EditMaintenanceRecordObservationsViewData = editMaintenanceRecordObservationsViewData; AllOrganizations = organizations.OrderBy(x => x.OrganizationName).ToSelectListWithDisabledEmptyFirstRow(x => x.OrganizationID.ToString(CultureInfo.InvariantCulture), x => x.OrganizationName, "Choose an Organization"); AllMaintenanceRecordTypes = MaintenanceRecordType.All.ToSelectListWithDisabledEmptyFirstRow( x => x.MaintenanceRecordTypeID.ToString(CultureInfo.InvariantCulture), x => x.MaintenanceRecordTypeDisplayName, "Choose a type"); TreatmentBMPUrl = treatmentBMP.GetDetailUrl(); MaintenanceRecordUrl = MaintenanceRecord?.GetDetailUrl(); }
private BenchmarkAndThresholdViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, string sectionName) : base(currentPerson, NeptuneArea.OCStormwaterTools) { TreatmentBMP = treatmentBMP; InstructionsUrl = SitkaRoute <TreatmentBMPBenchmarkAndThresholdController> .BuildUrlFromExpression(x => x.Instructions(treatmentBMP.TreatmentBMPID)); SectionName = sectionName; EntityName = FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized(); EntityUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); PageTitle = "Benchmark & Threshold"; }
public EditModelingAttributesViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, IEnumerable <RoutingConfiguration> routingConfigurations, IEnumerable <TimeOfConcentration> timeOfConcentrations, IEnumerable <UnderlyingHydrologicSoilGroup> underlyingHydrologicSoilGroups, List <MonthsOfOperation> monthsOfOperation, List <DryWeatherFlowOverride> dryWeatherFlowOverride) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; EntityUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); PageTitle = $"Edit {FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabel()} Modeling Attributes"; TreatmentBMP = treatmentBMP; DryWeatherFlowOverride = dryWeatherFlowOverride.ToSelectList(x => x.DryWeatherFlowOverrideID.ToString(), x => x.DryWeatherFlowOverrideDisplayName); MonthsOfOperation = monthsOfOperation.ToSelectList(x => x.MonthsOfOperationID.ToString(CultureInfo.InvariantCulture), x => x.MonthsOfOperationDisplayName); UnderlyingHydrologicSoilGroups = underlyingHydrologicSoilGroups.ToSelectListWithEmptyFirstRow(x => x.UnderlyingHydrologicSoilGroupID.ToString(), x => x.UnderlyingHydrologicSoilGroupDisplayName); TimeOfConcentrations = timeOfConcentrations.ToSelectListWithEmptyFirstRow(x => x.TimeOfConcentrationID.ToString(), x => $"{x.TimeOfConcentrationDisplayName} minutes"); RoutingConfigurations = routingConfigurations.ToSelectListWithEmptyFirstRow(x => x.RoutingConfigurationID.ToString(), x => x.RoutingConfigurationDisplayName); }
public NewViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, IEnumerable <StormwaterJurisdiction> stormwaterJurisdictions, IEnumerable <Models.TreatmentBMPType> treatmentBMPTypes, List <Models.Organization> organizations, Shared.Location.EditLocationViewData editLocationViewData, IEnumerable <Models.WaterQualityManagementPlan> waterQualityManagementPlans, IEnumerable <TreatmentBMPLifespanType> treatmentBMPLifespanTypes, IEnumerable <TrashCaptureStatusType> trashCaptureStatusTypes, IEnumerable <SizingBasisType> sizingBasisTypes) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EditLocationViewData = editLocationViewData; SizingBasisTypes = sizingBasisTypes.ToSelectListWithDisabledEmptyFirstRow( x => x.SizingBasisTypeID.ToString(CultureInfo.InvariantCulture), x => x.SizingBasisTypeDisplayName.ToString(CultureInfo.InvariantCulture)); EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; var treatmentBMPIndexUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); EntityUrl = treatmentBMPIndexUrl; if (treatmentBMP != null) { SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); TreatmentBMP = treatmentBMP; } PageTitle = $"New {FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabel()}"; TrashCaptureStatusTypes = trashCaptureStatusTypes.ToSelectListWithDisabledEmptyFirstRow( x => x.TrashCaptureStatusTypeID.ToString(CultureInfo.InvariantCulture), x => x.TrashCaptureStatusTypeDisplayName.ToString(CultureInfo.InvariantCulture)); StormwaterJurisdictionSelectListItems = stormwaterJurisdictions.OrderBy(x => x.GetOrganizationDisplayName()).ToSelectListWithEmptyFirstRow(x => x.StormwaterJurisdictionID.ToString(CultureInfo.InvariantCulture), y => y.GetOrganizationDisplayName()); TreatmentBMPTypeSelectListItems = treatmentBMPTypes.OrderBy(x => x.TreatmentBMPTypeName).ToSelectListWithEmptyFirstRow(x => x.TreatmentBMPTypeID.ToString(CultureInfo.InvariantCulture), y => y.TreatmentBMPTypeName); OwnerOrganizationSelectListItems = organizations.OrderBy(x => x.GetDisplayName()).ToSelectListWithEmptyFirstRow(x => x.OrganizationID.ToString(CultureInfo.InvariantCulture), y => y.GetDisplayName(), "Same as the BMP Jurisdiction"); TreatmentBMPIndexUrl = treatmentBMPIndexUrl; WaterQualityManagementPlanSelectListItems = BuildWaterQualityPlanSelectList(waterQualityManagementPlans); TreatmentBMPLifespanTypes = treatmentBMPLifespanTypes.ToSelectListWithEmptyFirstRow( x => x.TreatmentBMPLifespanTypeID.ToString(CultureInfo.InvariantCulture), x => x.TreatmentBMPLifespanTypeDisplayName.ToString(CultureInfo.InvariantCulture), "Unknown"); }
public EditLocationViewData(Person currentPerson, Models.TreatmentBMP treatmentBMP, MapInitJson mapInitJson, string mapFormID) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; var treatmentBMPIndexUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindABMP()); EntityUrl = treatmentBMPIndexUrl; if (treatmentBMP != null) { SubEntityName = treatmentBMP.TreatmentBMPName; SubEntityUrl = treatmentBMP.GetDetailUrl(); TreatmentBMP = treatmentBMP; } PageTitle = "Edit Location"; MapInitJson = mapInitJson; MapFormID = mapFormID; TreatmentBMPInformationContainer = $"{mapInitJson.MapDivID}LocationInformationContainer"; }