Пример #1
0
        public static List <LayerGeoJson> GetRegionMapLayers(LayerInitialVisibility layerInitialVisibility)
        {
            var layerGeoJsons = new List <LayerGeoJson>
            {
                DNRUplandRegion.GetRegionWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility)
            };

            return(layerGeoJsons);
        }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public FocusArea(string focusAreaName, FocusAreaStatus focusAreaStatus, DNRUplandRegion dNRUplandRegion) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.FocusAreaID       = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.FocusAreaName     = focusAreaName;
     this.FocusAreaStatusID = focusAreaStatus.FocusAreaStatusID;
     this.DNRUplandRegionID = dNRUplandRegion.DNRUplandRegionID;
     this.DNRUplandRegion   = dNRUplandRegion;
     dNRUplandRegion.FocusAreas.Add(this);
 }
Пример #3
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectRegion(Project project, DNRUplandRegion dNRUplandRegion) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectRegionID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectID       = project.ProjectID;
     this.Project         = project;
     project.ProjectRegions.Add(this);
     this.DNRUplandRegionID = dNRUplandRegion.DNRUplandRegionID;
     this.DNRUplandRegion   = dNRUplandRegion;
     dNRUplandRegion.ProjectRegions.Add(this);
 }
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public PersonStewardRegion(Person person, DNRUplandRegion dNRUplandRegion) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.PersonStewardRegionID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.PersonStewardRegions.Add(this);
     this.DNRUplandRegionID = dNRUplandRegion.DNRUplandRegionID;
     this.DNRUplandRegion   = dNRUplandRegion;
     dNRUplandRegion.PersonStewardRegions.Add(this);
 }
Пример #5
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public ProjectRegionUpdate(ProjectUpdateBatch projectUpdateBatch, DNRUplandRegion dNRUplandRegion) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.ProjectRegionUpdateID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.ProjectUpdateBatchID  = projectUpdateBatch.ProjectUpdateBatchID;
     this.ProjectUpdateBatch    = projectUpdateBatch;
     projectUpdateBatch.ProjectRegionUpdates.Add(this);
     this.DNRUplandRegionID = dNRUplandRegion.DNRUplandRegionID;
     this.DNRUplandRegion   = dNRUplandRegion;
     dNRUplandRegion.ProjectRegionUpdates.Add(this);
 }
Пример #6
0
        public static List <LayerGeoJson> GetAllGeospatialAreaMapLayers(LayerInitialVisibility layerInitialVisibility)
        {
            var layerGeoJsons = new List <LayerGeoJson>
            {
                GetAllSimpleProjectLocations(),
                GetAllDetailedProjectLocations(),
                GetAllProjectTreatments(),
                PriorityLandscape.GetPriorityLandscapeWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility),
                DNRUplandRegion.GetRegionWmsLayerGeoJson("#59ACFF", 0.2m, layerInitialVisibility)
            };

            return(layerGeoJsons);
        }
Пример #7
0
        public static List <LayerGeoJson> GetRegionAndAssociatedProjectLayers(DNRUplandRegion dnrUplandRegion, List <Project> projects)
        {
            var projectLayerGeoJson = new LayerGeoJson($"{FieldDefinition.ProjectLocation.GetFieldDefinitionLabel()} - Simple",
                                                       Project.MappedPointsToGeoJsonFeatureCollection(projects, true, false),
                                                       "#ffff00", 1, LayerInitialVisibility.Show);
            var regionLayerGeoJson = new LayerGeoJson(dnrUplandRegion.DisplayName,
                                                      new List <DNRUplandRegion> {
                dnrUplandRegion
            }.ToGeoJsonFeatureCollection(), "#2dc3a1", 1,
                                                      LayerInitialVisibility.Show);

            var layerGeoJsons = new List <LayerGeoJson>
            {
                projectLayerGeoJson,
                regionLayerGeoJson,
                GetRegionWmsLayerGeoJson("#59ACFF", 0.6m,
                                         LayerInitialVisibility.Show)
            };

            return(layerGeoJsons);
        }
Пример #8
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectRegion CreateNewBlank(Project project, DNRUplandRegion dNRUplandRegion)
 {
     return(new ProjectRegion(project, dNRUplandRegion));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static PersonStewardRegion CreateNewBlank(Person person, DNRUplandRegion dNRUplandRegion)
 {
     return(new PersonStewardRegion(person, dNRUplandRegion));
 }
Пример #10
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static ProjectRegionUpdate CreateNewBlank(ProjectUpdateBatch projectUpdateBatch, DNRUplandRegion dNRUplandRegion)
 {
     return(new ProjectRegionUpdate(projectUpdateBatch, dNRUplandRegion));
 }
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static FocusArea CreateNewBlank(FocusAreaStatus focusAreaStatus, DNRUplandRegion dNRUplandRegion)
 {
     return(new FocusArea(default(string), focusAreaStatus, dNRUplandRegion));
 }
Пример #12
0
 public static HtmlString GetRegionDisplayNameAsUrl(this DNRUplandRegion dnrUplandRegion)
 {
     return(dnrUplandRegion != null?UrlTemplate.MakeHrefString(dnrUplandRegion.GetDetailUrl(), dnrUplandRegion.DisplayName) : new HtmlString(null));
 }
Пример #13
0
 public static void DeleteDNRUplandRegion(this IQueryable <DNRUplandRegion> dNRUplandRegions, DNRUplandRegion dNRUplandRegionToDelete)
 {
     DeleteDNRUplandRegion(dNRUplandRegions, new List <DNRUplandRegion> {
         dNRUplandRegionToDelete
     });
 }