/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (ProjectFundingSourceBudgets.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudget).Name); } if (ProjectFundingSourceBudgetUpdates.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudgetUpdate).Name); } if (ProjectFundingSourceExpenditures.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditure).Name); } if (ProjectFundingSourceExpenditureUpdates.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditureUpdate).Name); } if (ProjectRelevantCostTypes.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostType).Name); } if (ProjectRelevantCostTypeUpdates.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostTypeUpdate).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in ProjectFundingSourceBudgets.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceBudgetUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceExpenditureUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypeUpdates.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (ProjectFundingSourceExpenditures.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditure).Name); } if (ProjectFundingSourceExpenditureUpdates.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditureUpdate).Name); } if (ProjectNoFundingSourceIdentifieds.Any()) { dependentObjects.Add(typeof(ProjectNoFundingSourceIdentified).Name); } if (ProjectNoFundingSourceIdentifiedUpdates.Any()) { dependentObjects.Add(typeof(ProjectNoFundingSourceIdentifiedUpdate).Name); } if (ProjectRelevantCostTypes.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostType).Name); } if (ProjectRelevantCostTypeUpdates.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostTypeUpdate).Name); } if (BudgetObjectCodesWhereYouAreTheOverrideCostType.Any()) { dependentObjects.Add(typeof(BudgetObjectCode).Name); } if (BudgetObjectCodeGroups.Any()) { dependentObjects.Add(typeof(BudgetObjectCodeGroup).Name); } if (ProjectFundingSourceBudgets.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudget).Name); } if (ProjectFundingSourceBudgetUpdates.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudgetUpdate).Name); } return(dependentObjects.Distinct().ToList()); }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in ProjectFundingSourceExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceExpenditureUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoFundingSourceIdentifieds.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoFundingSourceIdentifiedUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypeUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in BudgetObjectCodesWhereYouAreTheOverrideCostType.ToList()) { x.DeleteFull(dbContext); } foreach (var x in BudgetObjectCodeGroups.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceBudgets.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceBudgetUpdates.ToList()) { x.DeleteFull(dbContext); } }
public void UpdateModel(ProjectFirmaModels.Models.Project project, List <ProjectFirmaModels.Models.ProjectFundingSourceExpenditure> currentProjectFundingSourceExpenditures, IList <ProjectFirmaModels.Models.ProjectFundingSourceExpenditure> allProjectFundingSourceExpenditures) { var databaseEntities = HttpRequestStorage.DatabaseEntities; databaseEntities.ProjectExemptReportingYearUpdates.Load(); databaseEntities.ProjectRelevantCostTypes.Load(); var projectFundingSourceExpendituresUpdated = new List <ProjectFirmaModels.Models.ProjectFundingSourceExpenditure>(); if (ProjectFundingSourceExpenditures != null) { // Completely rebuild the list projectFundingSourceExpendituresUpdated = ProjectFundingSourceExpenditures.Where(x => x.IsRelevant).SelectMany(x => x.ToProjectFundingSourceExpendituresSetNullToZero()).ToList(); } currentProjectFundingSourceExpenditures.Merge(projectFundingSourceExpendituresUpdated, allProjectFundingSourceExpenditures, (x, y) => x.ProjectID == y.ProjectID && x.FundingSourceID == y.FundingSourceID && x.CostTypeID == y.CostTypeID && x.CalendarYear == y.CalendarYear, (x, y) => x.ExpenditureAmount = y.ExpenditureAmount, databaseEntities); var currentProjectRelevantCostTypes = project.GetExpendituresRelevantCostTypes(); var allProjectRelevantCostTypes = databaseEntities.AllProjectRelevantCostTypes.Local; var projectRelevantCostTypes = new List <ProjectRelevantCostType>(); if (ProjectRelevantCostTypes != null) { // Completely rebuild the list projectRelevantCostTypes = ProjectRelevantCostTypes.Where(x => x.IsRelevant) .Select(x => new ProjectRelevantCostType(x.ProjectRelevantCostTypeID, x.ProjectID, x.CostTypeID, ProjectRelevantCostTypeGroup.Expenditures.ProjectRelevantCostTypeGroupID)) .ToList(); } currentProjectRelevantCostTypes.Merge(projectRelevantCostTypes, allProjectRelevantCostTypes, (x, y) => x.ProjectID == y.ProjectID && x.CostTypeID == y.CostTypeID && x.ProjectRelevantCostTypeGroupID == y.ProjectRelevantCostTypeGroupID, databaseEntities); project.ExpendituresNote = ProjectFundingSourceExpenditures != null && ProjectFundingSourceExpenditures.Any() ? null : Explanation; }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in NotificationProjects.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureActuals.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureExpecteds.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectAssessmentQuestions.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectAttachments.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectClassifications.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectContacts.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectCustomAttributes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectEvaluations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectExemptReportingYears.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectExternalLinks.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceBudgets.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectFundingSourceExpenditures.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreas.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectGeospatialAreaTypeNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectImages.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectInternalNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocationStagings.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoFundingSourceIdentifieds.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNotes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectOrganizations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectProjectStatuses.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectRelevantCostTypes.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectTags.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectUpdateBatches.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SecondaryProjectTaxonomyLeafs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TechnicalAssistanceRequests.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// Active Dependent type names of this object /// </summary> public List <string> DependentObjectNames() { var dependentObjects = new List <string>(); if (NotificationProjects.Any()) { dependentObjects.Add(typeof(NotificationProject).Name); } if (PerformanceMeasureActuals.Any()) { dependentObjects.Add(typeof(PerformanceMeasureActual).Name); } if (PerformanceMeasureExpecteds.Any()) { dependentObjects.Add(typeof(PerformanceMeasureExpected).Name); } if (ProjectAssessmentQuestions.Any()) { dependentObjects.Add(typeof(ProjectAssessmentQuestion).Name); } if (ProjectAttachments.Any()) { dependentObjects.Add(typeof(ProjectAttachment).Name); } if (ProjectClassifications.Any()) { dependentObjects.Add(typeof(ProjectClassification).Name); } if (ProjectContacts.Any()) { dependentObjects.Add(typeof(ProjectContact).Name); } if (ProjectCustomAttributes.Any()) { dependentObjects.Add(typeof(ProjectCustomAttribute).Name); } if (ProjectEvaluations.Any()) { dependentObjects.Add(typeof(ProjectEvaluation).Name); } if (ProjectExemptReportingYears.Any()) { dependentObjects.Add(typeof(ProjectExemptReportingYear).Name); } if (ProjectExternalLinks.Any()) { dependentObjects.Add(typeof(ProjectExternalLink).Name); } if (ProjectFundingSourceBudgets.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceBudget).Name); } if (ProjectFundingSourceExpenditures.Any()) { dependentObjects.Add(typeof(ProjectFundingSourceExpenditure).Name); } if (ProjectGeospatialAreas.Any()) { dependentObjects.Add(typeof(ProjectGeospatialArea).Name); } if (ProjectGeospatialAreaTypeNotes.Any()) { dependentObjects.Add(typeof(ProjectGeospatialAreaTypeNote).Name); } if (ProjectImages.Any()) { dependentObjects.Add(typeof(ProjectImage).Name); } if (ProjectInternalNotes.Any()) { dependentObjects.Add(typeof(ProjectInternalNote).Name); } if (ProjectLocations.Any()) { dependentObjects.Add(typeof(ProjectLocation).Name); } if (ProjectLocationStagings.Any()) { dependentObjects.Add(typeof(ProjectLocationStaging).Name); } if (ProjectNoFundingSourceIdentifieds.Any()) { dependentObjects.Add(typeof(ProjectNoFundingSourceIdentified).Name); } if (ProjectNotes.Any()) { dependentObjects.Add(typeof(ProjectNote).Name); } if (ProjectOrganizations.Any()) { dependentObjects.Add(typeof(ProjectOrganization).Name); } if (ProjectProjectStatuses.Any()) { dependentObjects.Add(typeof(ProjectProjectStatus).Name); } if (ProjectRelevantCostTypes.Any()) { dependentObjects.Add(typeof(ProjectRelevantCostType).Name); } if (ProjectTags.Any()) { dependentObjects.Add(typeof(ProjectTag).Name); } if (ProjectUpdateBatches.Any()) { dependentObjects.Add(typeof(ProjectUpdateBatch).Name); } if (SecondaryProjectTaxonomyLeafs.Any()) { dependentObjects.Add(typeof(SecondaryProjectTaxonomyLeaf).Name); } if (TechnicalAssistanceRequests.Any()) { dependentObjects.Add(typeof(TechnicalAssistanceRequest).Name); } return(dependentObjects.Distinct().ToList()); }
/// <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(NotificationProjects.Any() || PerformanceMeasureActuals.Any() || PerformanceMeasureExpecteds.Any() || ProjectAssessmentQuestions.Any() || ProjectAttachments.Any() || ProjectClassifications.Any() || ProjectContacts.Any() || ProjectCustomAttributes.Any() || ProjectEvaluations.Any() || ProjectExemptReportingYears.Any() || ProjectExternalLinks.Any() || ProjectFundingSourceBudgets.Any() || ProjectFundingSourceExpenditures.Any() || ProjectGeospatialAreas.Any() || ProjectGeospatialAreaTypeNotes.Any() || ProjectImages.Any() || ProjectInternalNotes.Any() || ProjectLocations.Any() || ProjectLocationStagings.Any() || ProjectNoFundingSourceIdentifieds.Any() || ProjectNotes.Any() || ProjectOrganizations.Any() || ProjectProjectStatuses.Any() || ProjectRelevantCostTypes.Any() || ProjectTags.Any() || ProjectUpdateBatches.Any() || SecondaryProjectTaxonomyLeafs.Any() || TechnicalAssistanceRequests.Any()); }
public void UpdateModel(ProjectFirmaModels.Models.Project project, DatabaseEntities databaseEntities) { var currentProjectFundingSourceBudgets = project.ProjectFundingSourceBudgets.ToList(); databaseEntities.ProjectFundingSourceBudgets.Load(); var allProjectFundingSourceBudgets = databaseEntities.AllProjectFundingSourceBudgets.Local; var currentProjectNoFundingSourceIdentifieds = project.ProjectNoFundingSourceIdentifieds.ToList(); databaseEntities.ProjectNoFundingSourceIdentifieds.Load(); var allProjectNoFundingSourceIdentifieds = HttpRequestStorage.DatabaseEntities.AllProjectNoFundingSourceIdentifieds.Local; project.FundingTypeID = FundingTypeID; var projectFundingSourceBudgetsUpdated = new List <ProjectFirmaModels.Models.ProjectFundingSourceBudget>(); if (ProjectFundingSourceBudgets != null) { // Completely rebuild the list projectFundingSourceBudgetsUpdated = ProjectFundingSourceBudgets.Where(x => x.IsRelevant ?? false).SelectMany(x => x.ToProjectFundingSourceBudgets()).ToList(); } currentProjectFundingSourceBudgets.Merge(projectFundingSourceBudgetsUpdated, allProjectFundingSourceBudgets, (x, y) => x.ProjectID == y.ProjectID && x.FundingSourceID == y.FundingSourceID && x.CostTypeID == y.CostTypeID && x.CalendarYear == y.CalendarYear, (x, y) => x.SetSecuredAndTargetedAmounts(y.SecuredAmount, y.TargetedAmount), databaseEntities); var projectNoFundingSourceAmountsUpdated = new List <ProjectNoFundingSourceIdentified>(); if (FundingTypeID == FundingType.BudgetSameEachYear.FundingTypeID && NoFundingSourceIdentifiedYet != null) { // Completely rebuild the list projectNoFundingSourceAmountsUpdated.Add(new ProjectNoFundingSourceIdentified(project.ProjectID) { NoFundingSourceIdentifiedYet = NoFundingSourceIdentifiedYet }); } else if (FundingTypeID == FundingType.BudgetVariesByYear.FundingTypeID && NoFundingSourceAmounts != null) { // Completely rebuild the list projectNoFundingSourceAmountsUpdated = NoFundingSourceAmounts.Where(x => x.MonetaryAmount.HasValue) .Select(x => new ProjectNoFundingSourceIdentified(project.ProjectID) { CalendarYear = x.CalendarYear, NoFundingSourceIdentifiedYet = x.MonetaryAmount.Value }) .ToList(); } // set if funding type is "Varies By Year", delete rows otherwise currentProjectNoFundingSourceIdentifieds.Merge(projectNoFundingSourceAmountsUpdated, allProjectNoFundingSourceIdentifieds, (x, y) => x.ProjectID == y.ProjectID && x.CalendarYear == y.CalendarYear, (x, y) => x.NoFundingSourceIdentifiedYet = y.NoFundingSourceIdentifiedYet, databaseEntities); var currentProjectRelevantCostTypes = project.GetBudgetsRelevantCostTypes(); var allProjectRelevantCostTypes = databaseEntities.AllProjectRelevantCostTypes.Local; var projectRelevantCostTypes = new List <ProjectRelevantCostType>(); if (ProjectRelevantCostTypes != null) { // Completely rebuild the list projectRelevantCostTypes = ProjectRelevantCostTypes.Where(x => x.IsRelevant) .Select(x => new ProjectRelevantCostType(x.ProjectRelevantCostTypeID, x.ProjectID, x.CostTypeID, ProjectRelevantCostTypeGroup.Budgets.ProjectRelevantCostTypeGroupID)) .ToList(); } currentProjectRelevantCostTypes.Merge(projectRelevantCostTypes, allProjectRelevantCostTypes, (x, y) => x.ProjectID == y.ProjectID && x.CostTypeID == y.CostTypeID && x.ProjectRelevantCostTypeGroupID == y.ProjectRelevantCostTypeGroupID, databaseEntities); }
/// <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(ProjectFundingSourceExpenditures.Any() || ProjectFundingSourceExpenditureUpdates.Any() || ProjectNoFundingSourceIdentifieds.Any() || ProjectNoFundingSourceIdentifiedUpdates.Any() || ProjectRelevantCostTypes.Any() || ProjectRelevantCostTypeUpdates.Any() || BudgetObjectCodesWhereYouAreTheOverrideCostType.Any() || BudgetObjectCodeGroups.Any() || ProjectFundingSourceBudgets.Any() || ProjectFundingSourceBudgetUpdates.Any()); }
public void UpdateModel(ProjectUpdateBatch projectUpdateBatch, DatabaseEntities databaseEntities) { var currentProjectFundingSourceBudgetUpdates = projectUpdateBatch.ProjectFundingSourceBudgetUpdates.ToList(); databaseEntities.ProjectFundingSourceBudgetUpdates.Load(); var allProjectFundingSourceBudgetUpdates = databaseEntities.AllProjectFundingSourceBudgetUpdates.Local; var currentProjectNoFundingSourceIdentifiedUpdates = projectUpdateBatch.ProjectNoFundingSourceIdentifiedUpdates.ToList(); databaseEntities.ProjectNoFundingSourceIdentifiedUpdates.Load(); var allProjectNoFundingSourceIdentifiedUpdates = HttpRequestStorage.DatabaseEntities.AllProjectNoFundingSourceIdentifiedUpdates.Local; projectUpdateBatch.ProjectUpdate.FundingTypeID = FundingTypeID; projectUpdateBatch.ExpectedFundingUpdateNote = ExpectedFundingUpdateNote; var projectFundingSourceBudgetUpdatesUpdated = new List <ProjectFirmaModels.Models.ProjectFundingSourceBudgetUpdate>(); if (ProjectFundingSourceBudgets != null) { // Completely rebuild the list projectFundingSourceBudgetUpdatesUpdated = ProjectFundingSourceBudgets.Where(x => x.IsRelevant ?? false).SelectMany(x => x.ToProjectFundingSourceBudgetUpdates(projectUpdateBatch)).ToList(); } currentProjectFundingSourceBudgetUpdates.Merge(projectFundingSourceBudgetUpdatesUpdated, allProjectFundingSourceBudgetUpdates, (x, y) => x.ProjectUpdateBatchID == y.ProjectUpdateBatchID && x.FundingSourceID == y.FundingSourceID && x.CostTypeID == y.CostTypeID && x.CalendarYear == y.CalendarYear, (x, y) => x.SetProjectedAmount(y.ProjectedAmount), databaseEntities); var projectNoFundingSourceIdentifiedUpdatesUpdated = new List <ProjectNoFundingSourceIdentifiedUpdate>(); if (FundingTypeID == FundingType.BudgetSameEachYear.FundingTypeID && NoFundingSourceAmounts != null) { // Completely rebuild the list projectNoFundingSourceIdentifiedUpdatesUpdated = NoFundingSourceAmounts.Select(x => new ProjectNoFundingSourceIdentifiedUpdate(projectUpdateBatch.ProjectUpdateBatchID, x.CostTypeID) { NoFundingSourceIdentifiedYet = x.Amount }) .ToList(); } else if (FundingTypeID == FundingType.BudgetVariesByYear.FundingTypeID && NoFundingSourceAmounts != null) { // Completely rebuild the list projectNoFundingSourceIdentifiedUpdatesUpdated = NoFundingSourceAmounts.Select(x => new ProjectNoFundingSourceIdentifiedUpdate(projectUpdateBatch.ProjectUpdateBatchID, x.CostTypeID) { CalendarYear = x.CalendarYear, NoFundingSourceIdentifiedYet = x.Amount }) .ToList(); } // ReSharper disable once IdentifierTypo foreach (var pnfsi in projectNoFundingSourceIdentifiedUpdatesUpdated) { // ReSharper disable thrice StringLiteralTypo Debug.WriteLine($"pnfsi: pnfsi.ProjectUpdateBatchID: {pnfsi.ProjectUpdateBatchID} - pnfsi.CalendarYear: {pnfsi.CalendarYear} pnfsi.CostTypeID: {pnfsi.CostTypeID} pnfsi.NoFundingSourceIdentifiedYet (amount): {pnfsi.NoFundingSourceIdentifiedYet}"); } currentProjectNoFundingSourceIdentifiedUpdates.Merge(projectNoFundingSourceIdentifiedUpdatesUpdated, allProjectNoFundingSourceIdentifiedUpdates, (x, y) => x.ProjectUpdateBatchID == y.ProjectUpdateBatchID && x.CalendarYear == y.CalendarYear && x.CostTypeID == y.CostTypeID, (x, y) => x.NoFundingSourceIdentifiedYet = y.NoFundingSourceIdentifiedYet, databaseEntities); var currentProjectUpdateRelevantCostTypes = projectUpdateBatch.GetBudgetsRelevantCostTypes(); var allProjectRelevantCostTypeUpdates = databaseEntities.AllProjectRelevantCostTypeUpdates.Local; var projectRelevantCostTypeUpdates = new List <ProjectRelevantCostTypeUpdate>(); if (ProjectRelevantCostTypes != null) { // Completely rebuild the list projectRelevantCostTypeUpdates = ProjectRelevantCostTypes.Where(x => x.IsRelevant) .Select(x => new ProjectRelevantCostTypeUpdate(x.ProjectRelevantCostTypeID, projectUpdateBatch.ProjectUpdateBatchID, x.CostTypeID, ProjectRelevantCostTypeGroup.Budgets.ProjectRelevantCostTypeGroupID)) .ToList(); } currentProjectUpdateRelevantCostTypes.Merge(projectRelevantCostTypeUpdates, allProjectRelevantCostTypeUpdates, (x, y) => x.ProjectUpdateBatchID == y.ProjectUpdateBatchID && x.CostTypeID == y.CostTypeID && x.ProjectRelevantCostTypeGroupID == y.ProjectRelevantCostTypeGroupID, databaseEntities); }
/// <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(ProjectFundingSourceBudgets.Any() || ProjectFundingSourceBudgetUpdates.Any() || ProjectFundingSourceExpenditures.Any() || ProjectFundingSourceExpenditureUpdates.Any() || ProjectRelevantCostTypes.Any() || ProjectRelevantCostTypeUpdates.Any()); }