Пример #1
0
        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));
        }
Пример #2
0
 public EditViewModel(Models.TreatmentBMPType treatmentBMPType)
 {
     TreatmentBMPTypeID                     = treatmentBMPType.TreatmentBMPTypeID;
     TreatmentBMPTypeName                   = treatmentBMPType.TreatmentBMPTypeName;
     TreatmentBMPTypeDescription            = treatmentBMPType.TreatmentBMPTypeDescription;
     TreatmentBMPTypeObservationTypeSimples = treatmentBMPType.TreatmentBMPTypeAssessmentObservationTypes.Select(x => new TreatmentBMPTypeObservationTypeSimple(x)).ToList();
     TreatmentBMPTypeAttributeTypeSimples   = treatmentBMPType.TreatmentBMPTypeCustomAttributeTypes.Select(x => new TreatmentBMPTypeAttributeTypeSimple(x)).ToList();
 }
Пример #3
0
        public void UpdateModel(Models.TreatmentBMPType treatmentBMPType,
                                List <TreatmentBMPTypeAssessmentObservationType> currentTreatmentBMPTypeObservationTypes,
                                IList <TreatmentBMPTypeAssessmentObservationType> allTreatmentBMPTypeAssessmentObservationTypes,
                                List <TreatmentBMPTypeCustomAttributeType> currentTreatmentBMPTypeCustomAttributeTypes,
                                ObservableCollection <TreatmentBMPTypeCustomAttributeType> allTreatmentBMPTypeCustomAttributeTypes)
        {
            treatmentBMPType.TreatmentBMPTypeName        = TreatmentBMPTypeName;
            treatmentBMPType.TreatmentBMPTypeDescription = TreatmentBMPTypeDescription;

            var updatedTreatmentBMPTypeObservationTypes = new List <TreatmentBMPTypeAssessmentObservationType>();

            if (TreatmentBMPTypeObservationTypeSimples != null)
            {
                // Completely rebuild the list
                updatedTreatmentBMPTypeObservationTypes = TreatmentBMPTypeObservationTypeSimples.Select(x =>
                {
                    var overrideWeight = x.OverrideAssessmentScoreIfFailing != null && x.OverrideAssessmentScoreIfFailing.Value;

                    return(new TreatmentBMPTypeAssessmentObservationType(ModelObjectHelpers.NotYetAssignedID,
                                                                         treatmentBMPType.TreatmentBMPTypeID,
                                                                         x.TreatmentBMPAssessmentObservationTypeID,
                                                                         overrideWeight ? null : x.AssessmentScoreWeight / 100,
                                                                         x.DefaultThresholdValue,
                                                                         x.DefaultBenchmarkValue,
                                                                         x.OverrideAssessmentScoreIfFailing ?? false, null));
                }).ToList();
            }

            currentTreatmentBMPTypeObservationTypes.Merge(updatedTreatmentBMPTypeObservationTypes,
                                                          allTreatmentBMPTypeAssessmentObservationTypes,
                                                          (x, y) => x.TreatmentBMPTypeID == y.TreatmentBMPTypeID && x.TreatmentBMPAssessmentObservationTypeID == y.TreatmentBMPAssessmentObservationTypeID,
                                                          (x, y) =>
            {
                x.AssessmentScoreWeight            = y.AssessmentScoreWeight;
                x.DefaultThresholdValue            = y.DefaultThresholdValue;
                x.DefaultBenchmarkValue            = y.DefaultBenchmarkValue;
                x.OverrideAssessmentScoreIfFailing = y.OverrideAssessmentScoreIfFailing;
            });

            var updatedTreatmentBMPTypeCustomAttributeTypes = new List <TreatmentBMPTypeCustomAttributeType>();

            if (TreatmentBMPTypeAttributeTypeSimples != null)
            {
                // Completely rebuild the list
                updatedTreatmentBMPTypeCustomAttributeTypes = TreatmentBMPTypeAttributeTypeSimples.Select(x => new TreatmentBMPTypeCustomAttributeType(ModelObjectHelpers.NotYetAssignedID, treatmentBMPType.TreatmentBMPTypeID, x.CustomAttributeTypeID, null)).ToList();
            }

            currentTreatmentBMPTypeCustomAttributeTypes.Merge(updatedTreatmentBMPTypeCustomAttributeTypes, allTreatmentBMPTypeCustomAttributeTypes, (x, y) => x.TreatmentBMPTypeID == y.TreatmentBMPTypeID && x.CustomAttributeTypeID == y.CustomAttributeTypeID);
        }
Пример #4
0
        public EditViewData(Person currentPerson,
                            IEnumerable <TreatmentBMPTypeAssessmentObservationType> observationTypes, string submitUrl,
                            Models.NeptunePage instructionsNeptunePage, Models.TreatmentBMPType treatmentBMPType,
                            IEnumerable <TreatmentBMPTypeCustomAttributeType> customAttributeTypes,
                            IEnumerable <Models.TreatmentBMPAssessmentObservationType> allObservationTypes,
                            IEnumerable <Models.CustomAttributeType> allCustomAttributeTypes) : base(currentPerson, NeptuneArea.OCStormwaterTools)
        {
            EntityName = FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized();
            EntityUrl  = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(c => c.Manage());

            if (treatmentBMPType != null)
            {
                SubEntityName = treatmentBMPType.TreatmentBMPTypeName;
                SubEntityUrl  = treatmentBMPType.GetDetailUrl();
            }
            PageTitle = $"{(treatmentBMPType != null ? "Edit" : "New")} {FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabel()}";

            ViewDataForAngular       = new ViewDataForAngular(observationTypes, customAttributeTypes, allObservationTypes, allCustomAttributeTypes);
            TreatmentBMPTypeIndexUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(x => x.Manage());

            SubmitUrl = submitUrl;
            ViewInstructionsNeptunePage = new ViewPageContentViewData(instructionsNeptunePage, currentPerson);
        }
Пример #5
0
 public ObservationsViewDataForAngular(Models.TreatmentBMPType treatmentBMPType, List <CollectionMethodSectionViewModel> initialAssessmentObservations)
 {
     ObservationTypeSchemas = treatmentBMPType.TreatmentBMPTypeAssessmentObservationTypes.SortByOrderThenName()
                              .Select(x => new ObservationTypeSchema(x.TreatmentBMPAssessmentObservationType, initialAssessmentObservations)).ToList();
 }
Пример #6
0
 public static TreatmentBMPTypeAssessmentObservationType Create(Models.TreatmentBMPType treatmentBMPType, TreatmentBMPAssessmentObservationType TreatmentBMPAssessmentObservationType)
 {
     return(new TreatmentBMPTypeAssessmentObservationType(treatmentBMPType, TreatmentBMPAssessmentObservationType, false));
 }
Пример #7
0
        public TreatmentBMPsInTreatmentBMPTypeGridSpec(Person currentPerson, bool showDelete, bool showEdit,
                                                       Models.TreatmentBMPType treatmentBMPType)
        {
            if (showDelete)
            {
                Add(string.Empty, x =>
                {
                    var userHasDeletePermission = currentPerson.IsManagerOrAdmin() &&
                                                  currentPerson.IsAssignedToStormwaterJurisdiction(x.TreatmentBMP
                                                                                                   .StormwaterJurisdictionID);
                    return(DhtmlxGridHtmlHelpers.MakeDeleteIconAndLinkBootstrap(
                               TreatmentBMPModelExtensions.DeleteUrlTemplate.ParameterReplace(x.TreatmentBMP.TreatmentBMPID),
                               userHasDeletePermission, userHasDeletePermission));
                }, 30, DhtmlxGridColumnFilterType.None);
            }

            if (showEdit)
            {
                Add(string.Empty,
                    x => DhtmlxGridHtmlHelpers.MakeEditIconAsHyperlinkBootstrap(
                        TreatmentBMPModelExtensions.EditUrlTemplate.ParameterReplace(x.TreatmentBMP.TreatmentBMPID),
                        currentPerson.IsAssignedToStormwaterJurisdiction(x.TreatmentBMP.StormwaterJurisdictionID)), 30,
                    DhtmlxGridColumnFilterType.None);
            }

            Add(string.Empty,
                x => UrlTemplate.MakeHrefString(
                    TreatmentBMPModelExtensions.DetailUrlTemplate.ParameterReplace(x.TreatmentBMP.TreatmentBMPID),
                    "View", new Dictionary <string, string> {
                { "class", "gridButton" }
            }), 50,
                DhtmlxGridColumnFilterType.None);
            Add(FieldDefinitionType.TreatmentBMP.ToGridHeaderString("Name"),
                x => UrlTemplate.MakeHrefString(
                    TreatmentBMPModelExtensions.DetailUrlTemplate.ParameterReplace(x.TreatmentBMP.TreatmentBMPID),
                    x.TreatmentBMP.TreatmentBMPName), 170, DhtmlxGridColumnFilterType.Html);
            Add(FieldDefinitionType.Jurisdiction.ToGridHeaderString("Jurisdiction"),
                x => UrlTemplate.MakeHrefString(
                    StormwaterJurisdictionModelExtensions.DetailUrlTemplate.ParameterReplace(x.TreatmentBMP
                                                                                             .StormwaterJurisdictionID), x.vTreatmentBmpDetailed.OrganizationName), 170);
            Add("Owner Organization",
                x => UrlTemplate.MakeHrefString(
                    OrganizationModelExtensions.DetailUrlTemplate.ParameterReplace(x.TreatmentBMP.OwnerOrganizationID),
                    x.vTreatmentBmpDetailed.OwnerOrganizationName), 170);
            Add(FieldDefinitionType.TreatmentBMPType.ToGridHeaderString("Type"),
                x => x.vTreatmentBmpDetailed.TreatmentBMPTypeName, 100, DhtmlxGridColumnFilterType.SelectFilterStrict);
            Add("Year Built", x => x.TreatmentBMP.YearBuilt, 100, DhtmlxGridColumnFormatType.Date);
            Add("ID in System of Record", x => x.TreatmentBMP.SystemOfRecordID, 100);
            Add("Water Quality Management Plan", x => x.TreatmentBMP.WaterQualityManagementPlanID.HasValue ?
                x.TreatmentBMP.WaterQualityManagementPlan.GetDisplayNameAsUrl():
                "<p></p>".ToHTMLFormattedString(), 170);
            Add("Notes", x => x.TreatmentBMP.Notes, 195);
            Add("Last Assessment Date", x => x.vTreatmentBmpDetailed.LatestAssessmentDate, 130);
            Add("Last Assessed Score",
                x => x.vTreatmentBmpDetailed.LatestAssessmentScore.HasValue
                    ? x.vTreatmentBmpDetailed.LatestAssessmentScore.Value.ToString("0.0")
                    : "-", 100, DhtmlxGridColumnFilterType.FormattedNumeric);
            Add("# of Assessments", x => x.vTreatmentBmpDetailed.NumberOfAssessments, 100,
                DhtmlxGridColumnFormatType.Integer, DhtmlxGridColumnAggregationType.Total);
            Add("Last Maintenance Date", x => x.vTreatmentBmpDetailed.LatestMaintenanceDate, 130,
                DhtmlxGridColumnFormatType.Date);
            Add("# of Maintenance Events", x => x.vTreatmentBmpDetailed.NumberOfMaintenanceRecords, 100,
                DhtmlxGridColumnFormatType.Integer, DhtmlxGridColumnAggregationType.Total);
            Add("Benchmark and Threshold Set?",
                x => (x.vTreatmentBmpDetailed.NumberOfBenchmarkAndThresholds ==
                      x.vTreatmentBmpDetailed.NumberOfBenchmarkAndThresholdsEntered).ToYesNo(), 80,
                DhtmlxGridColumnFilterType.SelectFilterStrict);
            Add("Required Lifespan of Installation",
                x => x.vTreatmentBmpDetailed.TreatmentBMPLifespanTypeDisplayName ?? "Unknown", 170,
                DhtmlxGridColumnFilterType.SelectFilterStrict);
            Add("Lifespan End Date (if Fixed End Date)", x => x.vTreatmentBmpDetailed.TreatmentBMPLifespanEndDate, 130,
                DhtmlxGridColumnFormatType.Date);
            Add(FieldDefinitionType.RequiredFieldVisitsPerYear.ToGridHeaderString(),
                x => x.vTreatmentBmpDetailed.RequiredFieldVisitsPerYear, 130, DhtmlxGridColumnFormatType.Integer);
            Add(FieldDefinitionType.RequiredPostStormFieldVisitsPerYear.ToGridHeaderString(),
                x => x.vTreatmentBmpDetailed.RequiredPostStormFieldVisitsPerYear, 130,
                DhtmlxGridColumnFormatType.Integer);
            Add(FieldDefinitionType.SizingBasis.ToGridHeaderString(),
                x => x.vTreatmentBmpDetailed.SizingBasisTypeDisplayName, 130,
                DhtmlxGridColumnFilterType.SelectFilterStrict);
            Add(FieldDefinitionType.TrashCaptureStatus.ToGridHeaderString(),
                x => x.vTreatmentBmpDetailed.TrashCaptureStatusTypeDisplayName, 130,
                DhtmlxGridColumnFilterType.SelectFilterStrict);
            Add(FieldDefinitionType.DelineationType.ToGridHeaderString(),
                x => string.IsNullOrWhiteSpace(x.vTreatmentBmpDetailed.DelineationTypeDisplayName)
                    ? new HtmlString("<p class='systemText'>No Delineation Provided</p>")
                    : new HtmlString(x.vTreatmentBmpDetailed.DelineationTypeDisplayName), 130,
                DhtmlxGridColumnFilterType.SelectFilterHtmlStrict);

            foreach (var purpose in CustomAttributeTypePurpose.All)
            {
                if (purpose == CustomAttributeTypePurpose.Maintenance)
                {
                    continue;
                }

                var attributes = treatmentBMPType.TreatmentBMPTypeCustomAttributeTypes.Where(x =>
                                                                                             x.CustomAttributeType.CustomAttributeTypePurpose.CustomAttributeTypePurposeID ==
                                                                                             purpose.CustomAttributeTypePurposeID).ToList();

                if (!attributes.Any())
                {
                    continue;
                }

                foreach (var customAttributeType in attributes.SortByOrderThenName())
                {
                    switch (customAttributeType.CustomAttributeType.CustomAttributeDataTypeID)
                    {
                    case (int)CustomAttributeDataTypeEnum.Decimal:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => Decimal.TryParse(x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), out var decimalResult) ? decimalResult : (Decimal?)null, 130,
                            DhtmlxGridColumnFormatType.Decimal);
                        break;

                    case (int)CustomAttributeDataTypeEnum.Integer:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => Int32.TryParse(x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), out var intResult) ? intResult : (Int32?)null, 130);
                        break;

                    case (int)CustomAttributeDataTypeEnum.DateTime:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => DateTime.TryParse(x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), out var dateResult) ? dateResult : (DateTime?)null, 130);
                        break;

                    case (int)CustomAttributeDataTypeEnum.MultiSelect:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), 130,
                            DhtmlxGridColumnFilterType.SelectFilterStrict);
                        break;

                    case (int)CustomAttributeDataTypeEnum.PickFromList:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), 130,
                            DhtmlxGridColumnFilterType.SelectFilterStrict);
                        break;

                    case (int)CustomAttributeDataTypeEnum.String:
                        Add(customAttributeType.GetDisplayNameWithUnits(),
                            x => x.TreatmentBMP.GetCustomAttributeValue(customAttributeType), 130,
                            DhtmlxGridColumnFilterType.Text);
                        break;
                    }
                }
            }


            if (!treatmentBMPType.TreatmentBMPModelingTypeID.HasValue)
            {
                return;
            }

            Add(FieldDefinitionType.Watershed.ToGridHeaderString(),
                x => x.TreatmentBMP.Watershed?.WatershedName, 100);
            switch (treatmentBMPType.TreatmentBMPModelingType.ToEnum)
            {
            case TreatmentBMPModelingTypeEnum.BioinfiltrationBioretentionWithRaisedUnderdrain:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.StorageVolumeBelowLowestOutletElevation.ToGridHeaderString("Storage Volume Below Lowest Outlet Elevation (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.StorageVolumeBelowLowestOutletElevation, 100);
                Add(FieldDefinitionType.MediaBedFootprint.ToGridHeaderString("Media Bed Footprint (sq ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.MediaBedFootprint, 100);
                Add(FieldDefinitionType.DesignMediaFiltrationRate.ToGridHeaderString("Design Media Filtration Rate (in/hr)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DesignMediaFiltrationRate, 100);
                Add(FieldDefinitionType.UnderlyingHydrologicSoilGroupHSG.ToGridHeaderString("Underlying Hydrologic Soil Group"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.UnderlyingHydrologicSoilGroup?
                    .UnderlyingHydrologicSoilGroupDisplayName, 100);
                break;

            case TreatmentBMPModelingTypeEnum.BioretentionWithNoUnderdrain:
            case TreatmentBMPModelingTypeEnum.InfiltrationBasin:
            case TreatmentBMPModelingTypeEnum.InfiltrationTrench:
            case TreatmentBMPModelingTypeEnum.PermeablePavement:
            case TreatmentBMPModelingTypeEnum.UndergroundInfiltration:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.InfiltrationSurfaceArea.ToGridHeaderString("Infiltration Surface Area (sq ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.InfiltrationSurfaceArea, 100);
                Add(FieldDefinitionType.UnderlyingInfiltrationRate.ToGridHeaderString("Underlying Infiltration Rate (in/hr)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.UnderlyingInfiltrationRate, 100);
                break;

            case TreatmentBMPModelingTypeEnum.BioretentionWithUnderdrainAndImperviousLiner:
            case TreatmentBMPModelingTypeEnum.SandFilters:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.MediaBedFootprint.ToGridHeaderString("Media Bed Footprint (sq ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.MediaBedFootprint, 100);
                Add(FieldDefinitionType.DesignMediaFiltrationRate.ToGridHeaderString("Design Media Filtration Rate (in/hr)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DesignMediaFiltrationRate, 100);
                break;

            case TreatmentBMPModelingTypeEnum.CisternsForHarvestAndUse:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.WinterHarvestedWaterDemand.ToGridHeaderString("Winter Harvested Water Demand (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.WinterHarvestedWaterDemand, 100);
                Add(FieldDefinitionType.SummerHarvestedWaterDemand.ToGridHeaderString("Summer Harvested Water Demand (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.SummerHarvestedWaterDemand, 100);
                break;

            case TreatmentBMPModelingTypeEnum.ConstructedWetland:
            case TreatmentBMPModelingTypeEnum.WetDetentionBasin:
                Add(FieldDefinitionType.PermanentPoolOrWetlandVolume.ToGridHeaderString("Permanent Pool Or Wetland Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.PermanentPoolorWetlandVolume, 100);
                Add(FieldDefinitionType.DesignResidenceTimeForPermanentPool.ToGridHeaderString("Design Residence Time for Permanent Pool (days)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DesignResidenceTimeforPermanentPool, 100);
                Add(FieldDefinitionType.WaterQualityDetentionVolume.ToGridHeaderString("Water Quality Detention Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.WaterQualityDetentionVolume, 100);
                Add(FieldDefinitionType.DrawdownTimeForWQDetentionVolume.ToGridHeaderString("Drawdown Time For WQ Detention Volume (hours)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DrawdownTimeforWQDetentionVolume, 100);
                Add(FieldDefinitionType.WinterHarvestedWaterDemand.ToGridHeaderString("Winter Harvested Water Demand (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.WinterHarvestedWaterDemand, 100);
                Add(FieldDefinitionType.SummerHarvestedWaterDemand.ToGridHeaderString("Summer Harvested Water Demand (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.SummerHarvestedWaterDemand, 100);
                break;

            case TreatmentBMPModelingTypeEnum.DryExtendedDetentionBasin:
            case TreatmentBMPModelingTypeEnum.FlowDurationControlBasin:
            case TreatmentBMPModelingTypeEnum.FlowDurationControlTank:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.StorageVolumeBelowLowestOutletElevation.ToGridHeaderString("Storage Volume Below Lowest Outlet Elevation (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.StorageVolumeBelowLowestOutletElevation, 100);
                Add(FieldDefinitionType.EffectiveFootprint.ToGridHeaderString("Effective Footprint (sq ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.EffectiveFootprint, 100);
                Add(FieldDefinitionType.DrawdownTimeForWQDetentionVolume.ToGridHeaderString("Drawdown Time For WQ Detention Volume (hours)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DrawdownTimeforWQDetentionVolume, 100);
                Add(FieldDefinitionType.UnderlyingHydrologicSoilGroupHSG.ToGridHeaderString("Underlying Hydrologic Soil Group"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.UnderlyingHydrologicSoilGroup?
                    .UnderlyingHydrologicSoilGroupDisplayName, 100);
                break;

            case TreatmentBMPModelingTypeEnum.DryWeatherTreatmentSystems:
                Add(FieldDefinitionType.DesignDryWeatherTreatmentCapacity.ToGridHeaderString("Design Dry Weather Treatment Capacity (cfs)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DesignDryWeatherTreatmentCapacity, 100);
                Add(FieldDefinitionType.AverageTreatmentFlowrate.ToGridHeaderString("Average Treatment Flow Rate (cfs)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.AverageTreatmentFlowrate, 100);
                Add(FieldDefinitionType.MonthsOperational.ToGridHeaderString("Months Operational"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.MonthsOfOperation?
                    .MonthsOfOperationDisplayName, 100);
                break;

            case TreatmentBMPModelingTypeEnum.Drywell:
                Add(FieldDefinitionType.TotalEffectiveBMPVolume.ToGridHeaderString("Total Effective BMP Volume (cu ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TotalEffectiveBMPVolume, 100);
                Add(FieldDefinitionType.InfiltrationDischargeRate.ToGridHeaderString("Infiltration Discharge Rate (cfs)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.InfiltrationDischargeRate, 100);
                break;

            case TreatmentBMPModelingTypeEnum.HydrodynamicSeparator:
            case TreatmentBMPModelingTypeEnum.ProprietaryBiotreatment:
            case TreatmentBMPModelingTypeEnum.ProprietaryTreatmentControl:
                Add(FieldDefinitionType.TreatmentRate.ToGridHeaderString("Treatment Rate (cfs)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TreatmentRate, 100);
                Add(FieldDefinitionType.TimeOfConcentration.ToGridHeaderString("Time Of Concentration (mins)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TimeOfConcentration?
                    .TimeOfConcentrationDisplayName, 100);
                break;

            case TreatmentBMPModelingTypeEnum.LowFlowDiversions:
                Add(FieldDefinitionType.DesignLowFlowDiversionCapacity.ToGridHeaderString("Design Low Flow Diversion Capacity (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DesignLowFlowDiversionCapacity, 100);
                Add(FieldDefinitionType.AverageDivertedFlowrate.ToGridHeaderString("Average Diverted Flow Rate (gpd)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.AverageDivertedFlowrate, 100);
                Add(FieldDefinitionType.MonthsOperational.ToGridHeaderString("Months Operational"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.MonthsOfOperation?
                    .MonthsOfOperationDisplayName, 100);
                break;

            case TreatmentBMPModelingTypeEnum.VegetatedFilterStrip:
            case TreatmentBMPModelingTypeEnum.VegetatedSwale:
                Add(FieldDefinitionType.TimeOfConcentration.ToGridHeaderString("Time Of Concentration (mins)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TimeOfConcentration?
                    .TimeOfConcentrationDisplayName, 100);
                Add(FieldDefinitionType.TreatmentRate.ToGridHeaderString("Treatment Rate (cfs)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.TreatmentRate, 100);
                Add(FieldDefinitionType.WettedFootprint.ToGridHeaderString("Wetted Footprint (sq ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.WettedFootprint, 100);
                Add(FieldDefinitionType.EffectiveRetentionDepth.ToGridHeaderString("Effective Retention Depth (ft)"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.EffectiveRetentionDepth, 100);
                Add(FieldDefinitionType.UnderlyingHydrologicSoilGroupHSG.ToGridHeaderString("Underlying Hydrologic Soil Group"),
                    x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.UnderlyingHydrologicSoilGroup?
                    .UnderlyingHydrologicSoilGroupDisplayName, 100);
                break;
            }

            Add(FieldDefinitionType.DryWeatherFlowOverride.ToGridHeaderString("Dry Weather Flow Override"),
                x => x.TreatmentBMP.TreatmentBMPModelingAttribute?.DryWeatherFlowOverride?.DryWeatherFlowOverrideDisplayName, 100);
        }