Beispiel #1
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 #2
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());
 }