Exemple #1
0
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (AgreementGrantAllocations.Any())
            {
                dependentObjects.Add(typeof(AgreementGrantAllocation).Name);
            }

            if (AgreementPeople.Any())
            {
                dependentObjects.Add(typeof(AgreementPerson).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }
Exemple #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(AgreementGrantAllocations.Any() || AgreementPeople.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(AgreementGrantAllocations.Any() || GrantAllocationAwards.Any() || GrantAllocationBudgetLineItems.Any() || GrantAllocationChangeLogs.Any() || GrantAllocationExpenditures.Any() || GrantAllocationFileResources.Any() || GrantAllocationNotes.Any() || GrantAllocationNoteInternals.Any() || GrantAllocationProgramIndexProjectCodes.Any() || GrantAllocationProgramManagers.Any() || InvoiceLineItems.Any() || ProjectGrantAllocationExpenditures.Any() || ProjectGrantAllocationExpenditureUpdates.Any() || ProjectGrantAllocationRequests.Any() || ProjectGrantAllocationRequestUpdates.Any());
 }
        /// <summary>
        /// Active Dependent type names of this object
        /// </summary>
        public List <string> DependentObjectNames()
        {
            var dependentObjects = new List <string>();

            if (AgreementGrantAllocations.Any())
            {
                dependentObjects.Add(typeof(AgreementGrantAllocation).Name);
            }

            if (GrantAllocationAwards.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationAward).Name);
            }

            if (GrantAllocationBudgetLineItems.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationBudgetLineItem).Name);
            }

            if (GrantAllocationChangeLogs.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationChangeLog).Name);
            }

            if (GrantAllocationExpenditures.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationExpenditure).Name);
            }

            if (GrantAllocationFileResources.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationFileResource).Name);
            }

            if (GrantAllocationNotes.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationNote).Name);
            }

            if (GrantAllocationNoteInternals.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationNoteInternal).Name);
            }

            if (GrantAllocationProgramIndexProjectCodes.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationProgramIndexProjectCode).Name);
            }

            if (GrantAllocationProgramManagers.Any())
            {
                dependentObjects.Add(typeof(GrantAllocationProgramManager).Name);
            }

            if (InvoiceLineItems.Any())
            {
                dependentObjects.Add(typeof(InvoiceLineItem).Name);
            }

            if (ProjectGrantAllocationExpenditures.Any())
            {
                dependentObjects.Add(typeof(ProjectGrantAllocationExpenditure).Name);
            }

            if (ProjectGrantAllocationExpenditureUpdates.Any())
            {
                dependentObjects.Add(typeof(ProjectGrantAllocationExpenditureUpdate).Name);
            }

            if (ProjectGrantAllocationRequests.Any())
            {
                dependentObjects.Add(typeof(ProjectGrantAllocationRequest).Name);
            }

            if (ProjectGrantAllocationRequestUpdates.Any())
            {
                dependentObjects.Add(typeof(ProjectGrantAllocationRequestUpdate).Name);
            }
            return(dependentObjects.Distinct().ToList());
        }