/// <summary>
 /// Dependent type names of this entity
 /// </summary>
 public void DeleteChildren(DatabaseEntities dbContext)
 {
     foreach (var x in WaterQualityManagementPlans.ToList())
     {
         x.DeleteFull(dbContext);
     }
 }
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (WaterQualityManagementPlans.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlan).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Пример #3
0
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (DelineationStagings.Any())
            {
                dependentObjects.Add(typeof(DelineationStaging).Name);
            }

            if (LandUseBlocks.Any())
            {
                dependentObjects.Add(typeof(LandUseBlock).Name);
            }

            if (OnlandVisualTrashAssessments.Any())
            {
                dependentObjects.Add(typeof(OnlandVisualTrashAssessment).Name);
            }

            if (OnlandVisualTrashAssessmentAreas.Any())
            {
                dependentObjects.Add(typeof(OnlandVisualTrashAssessmentArea).Name);
            }

            if ((StormwaterJurisdictionGeometry != null))
            {
                dependentObjects.Add(typeof(StormwaterJurisdictionGeometry).Name);
            }

            if (StormwaterJurisdictionPeople.Any())
            {
                dependentObjects.Add(typeof(StormwaterJurisdictionPerson).Name);
            }

            if (TrashGeneratingUnits.Any())
            {
                dependentObjects.Add(typeof(TrashGeneratingUnit).Name);
            }

            if (TrashGeneratingUnit4326s.Any())
            {
                dependentObjects.Add(typeof(TrashGeneratingUnit4326).Name);
            }

            if (TreatmentBMPs.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMP).Name);
            }

            if (WaterQualityManagementPlans.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlan).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Пример #4
0
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in DelineationStagings.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in LandUseBlocks.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in OnlandVisualTrashAssessments.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in OnlandVisualTrashAssessmentAreas.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in StormwaterJurisdictionGeometries.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in StormwaterJurisdictionPeople.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TrashGeneratingUnits.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TrashGeneratingUnit4326s.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in TreatmentBMPs.ToList())
            {
                x.DeleteFull(dbContext);
            }

            foreach (var x in WaterQualityManagementPlans.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
Пример #5
0
 /// <summary>
 /// Does this object have any dependent objects? (If it does have dependent objects, these would need to be deleted before this object could be deleted.)
 /// </summary>
 /// <returns></returns>
 public bool HasDependentObjects()
 {
     return(DelineationStagings.Any() || LandUseBlocks.Any() || OnlandVisualTrashAssessments.Any() || OnlandVisualTrashAssessmentAreas.Any() || (StormwaterJurisdictionGeometry != null) || StormwaterJurisdictionPeople.Any() || TrashGeneratingUnits.Any() || TrashGeneratingUnit4326s.Any() || TreatmentBMPs.Any() || WaterQualityManagementPlans.Any());
 }
 /// <summary>
 /// Does this object have any dependent objects? (If it does have dependent objects, these would need to be deleted before this object could be deleted.)
 /// </summary>
 /// <returns></returns>
 public bool HasDependentObjects()
 {
     return(WaterQualityManagementPlans.Any());
 }