Beispiel #1
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());
        }
Beispiel #2
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);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Dependent type names of this entity
        /// </summary>
        public void DeleteChildren(DatabaseEntities dbContext)
        {
            foreach (var x in AuditLogs.ToList())
            {
                x.DeleteFull(dbContext);
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (AuditLogs.Any())
            {
                dependentObjects.Add(typeof(AuditLog).Name);
            }

            if (DelineationsWhereYouAreTheVerifiedByPerson.Any())
            {
                dependentObjects.Add(typeof(Delineation).Name);
            }

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

            if (FieldVisitsWhereYouAreThePerformedByPerson.Any())
            {
                dependentObjects.Add(typeof(FieldVisit).Name);
            }

            if (FileResourcesWhereYouAreTheCreatePerson.Any())
            {
                dependentObjects.Add(typeof(FileResource).Name);
            }

            if (LandUseBlockStagingsWhereYouAreTheUploadedByPerson.Any())
            {
                dependentObjects.Add(typeof(LandUseBlockStaging).Name);
            }

            if (Notifications.Any())
            {
                dependentObjects.Add(typeof(Notification).Name);
            }

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

            if (OrganizationsWhereYouAreThePrimaryContactPerson.Any())
            {
                dependentObjects.Add(typeof(Organization).Name);
            }

            if (RegionalSubbasinRevisionRequestsWhereYouAreTheClosedByPerson.Any())
            {
                dependentObjects.Add(typeof(RegionalSubbasinRevisionRequest).Name);
            }

            if (RegionalSubbasinRevisionRequestsWhereYouAreTheRequestPerson.Any())
            {
                dependentObjects.Add(typeof(RegionalSubbasinRevisionRequest).Name);
            }

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

            if (SupportRequestLogsWhereYouAreTheRequestPerson.Any())
            {
                dependentObjects.Add(typeof(SupportRequestLog).Name);
            }

            if (TrashGeneratingUnitAdjustmentsWhereYouAreTheAdjustedByPerson.Any())
            {
                dependentObjects.Add(typeof(TrashGeneratingUnitAdjustment).Name);
            }

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

            if (WaterQualityManagementPlanVerifiesWhereYouAreTheLastEditedByPerson.Any())
            {
                dependentObjects.Add(typeof(WaterQualityManagementPlanVerify).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Beispiel #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(AuditLogs.Any() || DelineationsWhereYouAreTheVerifiedByPerson.Any() || DelineationStagingsWhereYouAreTheUploadedByPerson.Any() || FieldVisitsWhereYouAreThePerformedByPerson.Any() || FileResourcesWhereYouAreTheCreatePerson.Any() || LandUseBlockStagingsWhereYouAreTheUploadedByPerson.Any() || Notifications.Any() || OnlandVisualTrashAssessmentsWhereYouAreTheCreatedByPerson.Any() || OrganizationsWhereYouAreThePrimaryContactPerson.Any() || RegionalSubbasinRevisionRequestsWhereYouAreTheClosedByPerson.Any() || RegionalSubbasinRevisionRequestsWhereYouAreTheRequestPerson.Any() || StormwaterJurisdictionPeople.Any() || SupportRequestLogsWhereYouAreTheRequestPerson.Any() || TrashGeneratingUnitAdjustmentsWhereYouAreTheAdjustedByPerson.Any() || TreatmentBMPsWhereYouAreTheInventoryVerifiedByPerson.Any() || WaterQualityManagementPlanVerifiesWhereYouAreTheLastEditedByPerson.Any());
 }
Beispiel #6
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());
 }