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

            if (TreatmentBMPs.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMP).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (CustomAttributes.Any())
            {
                dependentObjects.Add(typeof(CustomAttribute).Name);
            }

            if (MaintenanceRecords.Any())
            {
                dependentObjects.Add(typeof(MaintenanceRecord).Name);
            }

            if (MaintenanceRecordObservations.Any())
            {
                dependentObjects.Add(typeof(MaintenanceRecordObservation).Name);
            }

            if (QuickBMPs.Any())
            {
                dependentObjects.Add(typeof(QuickBMP).Name);
            }

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

            if (TreatmentBMPAssessments.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPAssessment).Name);
            }

            if (TreatmentBMPBenchmarkAndThresholds.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPBenchmarkAndThreshold).Name);
            }

            if (TreatmentBMPObservations.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPObservation).Name);
            }

            if (TreatmentBMPTypeAssessmentObservationTypes.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPTypeAssessmentObservationType).Name);
            }

            if (TreatmentBMPTypeCustomAttributeTypes.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMPTypeCustomAttributeType).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Example #4
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());
        }
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in CustomAttributes.ToList())
            {
                x.DeleteFull(dbContext);
            }

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

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

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

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

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

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

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

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

            foreach (var x in TreatmentBMPTypeCustomAttributeTypes.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
Example #6
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);
            }
        }
        public IEnumerable <HRUCharacteristic> GetHRUCharacteristics()
        {
            if (WaterQualityManagementPlanModelingApproachID == WaterQualityManagementPlanModelingApproach.Simplified
                .WaterQualityManagementPlanModelingApproachID)
            {
                return(HttpRequestStorage.DatabaseEntities.HRUCharacteristics.Where(x =>
                                                                                    x.LoadGeneratingUnit.WaterQualityManagementPlanID == WaterQualityManagementPlanID));
            }
            else
            {
                var treatmentBMPIDs = TreatmentBMPs.Where(x => x.Delineation != null).Select(x => (int?)x.Delineation.DelineationID).ToList();

                return(HttpRequestStorage.DatabaseEntities.HRUCharacteristics.Where(x =>
                                                                                    treatmentBMPIDs.Contains(x.LoadGeneratingUnit.DelineationID)));
            }
        }
Example #8
0
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in LoadGeneratingUnits.ToList())
            {
                x.DeleteFull(dbContext);
            }

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

            foreach (var x in TreatmentBMPs.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
Example #9
0
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (LoadGeneratingUnits.Any())
            {
                dependentObjects.Add(typeof(LoadGeneratingUnit).Name);
            }

            if (RegionalSubbasins.Any())
            {
                dependentObjects.Add(typeof(RegionalSubbasin).Name);
            }

            if (TreatmentBMPs.Any())
            {
                dependentObjects.Add(typeof(TreatmentBMP).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Example #10
0
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (LoadGeneratingUnits.Any())
            {
                dependentObjects.Add(typeof(LoadGeneratingUnit).Name);
            }

            if (QuickBMPs.Any())
            {
                dependentObjects.Add(typeof(QuickBMP).Name);
            }

            if (SourceControlBMPs.Any())
            {
                dependentObjects.Add(typeof(SourceControlBMP).Name);
            }

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

            if (WaterQualityManagementPlanDocuments.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlanDocument).Name);
            }

            if (WaterQualityManagementPlanParcels.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlanParcel).Name);
            }

            if (WaterQualityManagementPlanVerifies.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlanVerify).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Example #11
0
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in LoadGeneratingUnits.ToList())
            {
                x.DeleteFull(dbContext);
            }

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

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

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

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

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

            foreach (var x in WaterQualityManagementPlanVerifies.ToList())
            {
                x.DeleteFull(dbContext);
            }
        }
 /// <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(CustomAttributes.Any() || MaintenanceRecords.Any() || MaintenanceRecordObservations.Any() || QuickBMPs.Any() || TreatmentBMPs.Any() || TreatmentBMPAssessments.Any() || TreatmentBMPBenchmarkAndThresholds.Any() || TreatmentBMPObservations.Any() || TreatmentBMPTypeAssessmentObservationTypes.Any() || TreatmentBMPTypeCustomAttributeTypes.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(TreatmentBMPs.Any());
 }
Example #14
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());
 }
Example #15
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(LoadGeneratingUnits.Any() || RegionalSubbasins.Any() || TreatmentBMPs.Any());
 }
Example #16
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(LoadGeneratingUnits.Any() || QuickBMPs.Any() || SourceControlBMPs.Any() || TreatmentBMPs.Any() || WaterQualityManagementPlanDocuments.Any() || WaterQualityManagementPlanParcels.Any() || WaterQualityManagementPlanVerifies.Any());
 }