public static string GetDetailUrl(this StormwaterJurisdiction stormwaterJurisdiction)
 {
     if (stormwaterJurisdiction == null)
     {
         return("");
     }
     return(DetailUrlTemplate.ParameterReplace(stormwaterJurisdiction.StormwaterJurisdictionID));
 }
Exemple #2
0
        private static GeoJSON.Net.Feature.Feature MakeFeatureWithRelevantProperties(StormwaterJurisdiction stormwaterJurisdiction)
        {
            var feature = DbGeometryToGeoJsonHelper.FromDbGeometryWithNoReproject(stormwaterJurisdiction.StormwaterJurisdictionGeometry.Geometry4326);

            feature.Properties.Add("State", stormwaterJurisdiction.StateProvince.StateProvinceAbbreviation);
            feature.Properties.Add("County/City", stormwaterJurisdiction.Organization.OrganizationName);
            feature.Properties.Add("StormwaterJurisdictionID", stormwaterJurisdiction.StormwaterJurisdictionID);
            return(feature);
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public StormwaterJurisdictionGeometry(StormwaterJurisdiction stormwaterJurisdiction, DbGeometry geometryNative, DbGeometry geometry4326) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.StormwaterJurisdictionGeometryID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.StormwaterJurisdictionID         = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction           = stormwaterJurisdiction;
     this.GeometryNative = geometryNative;
     this.Geometry4326   = geometry4326;
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public TrashGeneratingUnit4326(StormwaterJurisdiction stormwaterJurisdiction, DbGeometry trashGeneratingUnit4326Geometry) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.TrashGeneratingUnit4326ID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.StormwaterJurisdictionID  = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction    = stormwaterJurisdiction;
     stormwaterJurisdiction.TrashGeneratingUnit4326s.Add(this);
     this.TrashGeneratingUnit4326Geometry = trashGeneratingUnit4326Geometry;
 }
Exemple #5
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public LandUseBlock(DbGeometry landUseBlockGeometry, StormwaterJurisdiction stormwaterJurisdiction, PermitType permitType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.LandUseBlockID           = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.LandUseBlockGeometry     = landUseBlockGeometry;
     this.StormwaterJurisdictionID = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction   = stormwaterJurisdiction;
     stormwaterJurisdiction.LandUseBlocks.Add(this);
     this.PermitTypeID = permitType.PermitTypeID;
 }
        public static IEnumerable <LayerGeoJson> GetJurisdictionMapLayers()
        {
            var layerGeoJsons = new List <LayerGeoJson>();
            var jurisdictions = HttpRequestStorage.DatabaseEntities.StormwaterJurisdictionGeometries
                                .Select(x => x.StormwaterJurisdiction).ToList();
            var geoJsonForJurisdictions = StormwaterJurisdiction.ToGeoJsonFeatureCollection(jurisdictions);

            layerGeoJsons.Add(new LayerGeoJson(CountyCityLayerName, geoJsonForJurisdictions, "#FF6C2D", 0m, LayerInitialVisibility.Hide));
            return(layerGeoJsons);
        }
Exemple #7
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public WaterQualityManagementPlan(StormwaterJurisdiction stormwaterJurisdiction, string waterQualityManagementPlanName, TrashCaptureStatusType trashCaptureStatusType, WaterQualityManagementPlanModelingApproach waterQualityManagementPlanModelingApproach) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.WaterQualityManagementPlanID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.StormwaterJurisdictionID     = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction       = stormwaterJurisdiction;
     stormwaterJurisdiction.WaterQualityManagementPlans.Add(this);
     this.WaterQualityManagementPlanName = waterQualityManagementPlanName;
     this.TrashCaptureStatusTypeID       = trashCaptureStatusType.TrashCaptureStatusTypeID;
     this.WaterQualityManagementPlanModelingApproachID = waterQualityManagementPlanModelingApproach.WaterQualityManagementPlanModelingApproachID;
 }
Exemple #8
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public StormwaterJurisdictionPerson(StormwaterJurisdiction stormwaterJurisdiction, Person person) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.StormwaterJurisdictionPersonID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.StormwaterJurisdictionID       = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction         = stormwaterJurisdiction;
     stormwaterJurisdiction.StormwaterJurisdictionPeople.Add(this);
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.StormwaterJurisdictionPeople.Add(this);
 }
        public static string GetGeoserverRequestUrl(this StormwaterJurisdiction stormwaterJurisdiction,
                                                    OnlandVisualTrashAssessmentExportTypeEnum exportType)
        {
            string typeName;

            switch (exportType)
            {
            case OnlandVisualTrashAssessmentExportTypeEnum.ExportAreas:
                typeName = "OCStormwater:AssessmentAreaExport";
                break;

            case OnlandVisualTrashAssessmentExportTypeEnum.ExportTransects:
                typeName = "OCStormwater:TransectLineExport";
                break;

            case OnlandVisualTrashAssessmentExportTypeEnum.ExportObservationPoints:
                typeName = "OCStormwater:ObservationPointExport";
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(exportType), exportType, null);
            }

            var cqlFilter = $"JurisID={stormwaterJurisdiction.StormwaterJurisdictionID}";

            var parameters = new
            {
                service = "WFS",
                version = "1.0.0",
                request = "GetFeature",
                typeName,
                outputFormat = "shape-zip",
                cql_filter   = cqlFilter
            };

            return($"{NeptuneWebConfiguration.ParcelMapServiceUrl}?{NeptuneHelpers.GetQueryString(parameters)}");
        }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static TrashGeneratingUnit4326 CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(new TrashGeneratingUnit4326(stormwaterJurisdiction, default(DbGeometry)));
 }
 public static void DeleteStormwaterJurisdiction(this IQueryable <StormwaterJurisdiction> stormwaterJurisdictions, StormwaterJurisdiction stormwaterJurisdictionToDelete)
 {
     DeleteStormwaterJurisdiction(stormwaterJurisdictions, new List <StormwaterJurisdiction> {
         stormwaterJurisdictionToDelete
     });
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static StormwaterJurisdictionGeometry CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(new StormwaterJurisdictionGeometry(stormwaterJurisdiction, default(DbGeometry), default(DbGeometry)));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static TreatmentBMP CreateNewBlank(TreatmentBMPType treatmentBMPType, StormwaterJurisdiction stormwaterJurisdiction, Organization ownerOrganization, TrashCaptureStatusType trashCaptureStatusType, SizingBasisType sizingBasisType)
 {
     return(new TreatmentBMP(default(string), treatmentBMPType, stormwaterJurisdiction, ownerOrganization, default(bool), trashCaptureStatusType, sizingBasisType));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public DelineationStaging(DbGeometry delineationStagingGeometry, Person uploadedByPerson, string treatmentBMPName, StormwaterJurisdiction stormwaterJurisdiction) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.DelineationStagingID       = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.DelineationStagingGeometry = delineationStagingGeometry;
     this.UploadedByPersonID         = uploadedByPerson.PersonID;
     this.UploadedByPerson           = uploadedByPerson;
     uploadedByPerson.DelineationStagingsWhereYouAreTheUploadedByPerson.Add(this);
     this.TreatmentBMPName         = treatmentBMPName;
     this.StormwaterJurisdictionID = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction   = stormwaterJurisdiction;
     stormwaterJurisdiction.DelineationStagings.Add(this);
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public OnlandVisualTrashAssessmentArea(string onlandVisualTrashAssessmentAreaName, StormwaterJurisdiction stormwaterJurisdiction, DbGeometry onlandVisualTrashAssessmentAreaGeometry) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OnlandVisualTrashAssessmentAreaID   = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.OnlandVisualTrashAssessmentAreaName = onlandVisualTrashAssessmentAreaName;
     this.StormwaterJurisdictionID            = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction = stormwaterJurisdiction;
     stormwaterJurisdiction.OnlandVisualTrashAssessmentAreas.Add(this);
     this.OnlandVisualTrashAssessmentAreaGeometry = onlandVisualTrashAssessmentAreaGeometry;
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static OnlandVisualTrashAssessment CreateNewBlank(Person createdByPerson, StormwaterJurisdiction stormwaterJurisdiction, OnlandVisualTrashAssessmentStatus onlandVisualTrashAssessmentStatus)
 {
     return(new OnlandVisualTrashAssessment(createdByPerson, default(DateTime), stormwaterJurisdiction, onlandVisualTrashAssessmentStatus, default(bool), default(bool)));
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public OnlandVisualTrashAssessment(Person createdByPerson, DateTime createdDate, StormwaterJurisdiction stormwaterJurisdiction, OnlandVisualTrashAssessmentStatus onlandVisualTrashAssessmentStatus, bool isTransectBackingAssessment, bool isProgressAssessment) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.OnlandVisualTrashAssessmentID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.CreatedByPersonID             = createdByPerson.PersonID;
     this.CreatedByPerson = createdByPerson;
     createdByPerson.OnlandVisualTrashAssessmentsWhereYouAreTheCreatedByPerson.Add(this);
     this.CreatedDate = createdDate;
     this.StormwaterJurisdictionID = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction   = stormwaterJurisdiction;
     stormwaterJurisdiction.OnlandVisualTrashAssessments.Add(this);
     this.OnlandVisualTrashAssessmentStatusID = onlandVisualTrashAssessmentStatus.OnlandVisualTrashAssessmentStatusID;
     this.IsTransectBackingAssessment         = isTransectBackingAssessment;
     this.IsProgressAssessment = isProgressAssessment;
 }
Exemple #18
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static LandUseBlock CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction, PermitType permitType)
 {
     return(new LandUseBlock(default(DbGeometry), stormwaterJurisdiction, permitType));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static OnlandVisualTrashAssessmentArea CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(new OnlandVisualTrashAssessmentArea(default(string), stormwaterJurisdiction, default(DbGeometry)));
 }
 public static HtmlString GetDisplayNameAsDetailUrl(this StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(new HtmlString(
                $"<a href=\"{stormwaterJurisdiction.GetDetailUrl()}\" alt=\"{stormwaterJurisdiction.GetOrganizationDisplayName()}\" title=\"{stormwaterJurisdiction.GetOrganizationDisplayName()}\" >{stormwaterJurisdiction.GetOrganizationDisplayName()}</a>"));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static DelineationStaging CreateNewBlank(Person uploadedByPerson, StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(new DelineationStaging(default(DbGeometry), uploadedByPerson, default(string), stormwaterJurisdiction));
 }
 public static List <Person> PeopleWhoCanManageStormwaterJurisdiction(this StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(stormwaterJurisdiction.StormwaterJurisdictionPeople.Select(x => x.Person).ToList());
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public TreatmentBMP(string treatmentBMPName, TreatmentBMPType treatmentBMPType, StormwaterJurisdiction stormwaterJurisdiction, Organization ownerOrganization, bool inventoryIsVerified, TrashCaptureStatusType trashCaptureStatusType, SizingBasisType sizingBasisType) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.TreatmentBMPID     = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.TreatmentBMPName   = treatmentBMPName;
     this.TreatmentBMPTypeID = treatmentBMPType.TreatmentBMPTypeID;
     this.TreatmentBMPType   = treatmentBMPType;
     treatmentBMPType.TreatmentBMPs.Add(this);
     this.StormwaterJurisdictionID = stormwaterJurisdiction.StormwaterJurisdictionID;
     this.StormwaterJurisdiction   = stormwaterJurisdiction;
     stormwaterJurisdiction.TreatmentBMPs.Add(this);
     this.OwnerOrganizationID = ownerOrganization.OrganizationID;
     this.OwnerOrganization   = ownerOrganization;
     ownerOrganization.TreatmentBMPsWhereYouAreTheOwnerOrganization.Add(this);
     this.InventoryIsVerified      = inventoryIsVerified;
     this.TrashCaptureStatusTypeID = trashCaptureStatusType.TrashCaptureStatusTypeID;
     this.SizingBasisTypeID        = sizingBasisType.SizingBasisTypeID;
 }
 public static List <Person> PeopleWhoCanManageStormwaterJurisdictionExceptSitka(this StormwaterJurisdiction stormwaterJurisdiction)
 {
     return(stormwaterJurisdiction.PeopleWhoCanManageStormwaterJurisdiction().ToList());
 }
Exemple #25
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static StormwaterJurisdictionPerson CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction, Person person)
 {
     return(new StormwaterJurisdictionPerson(stormwaterJurisdiction, person));
 }
Exemple #26
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static WaterQualityManagementPlan CreateNewBlank(StormwaterJurisdiction stormwaterJurisdiction, TrashCaptureStatusType trashCaptureStatusType, WaterQualityManagementPlanModelingApproach waterQualityManagementPlanModelingApproach)
 {
     return(new WaterQualityManagementPlan(stormwaterJurisdiction, default(string), trashCaptureStatusType, waterQualityManagementPlanModelingApproach));
 }