/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in Deliverables.ToList()) { x.DeleteFull(dbContext); } }
/// <summary> /// SortForPostman sorts the elements of the deliverables-list alfabetically by street, /// then by postman-ordered house-numbers. /// The postman walks along the street, first the side of the street with the odd numbers (in an increasing order), /// then back on the other side of the street for the even house-numbers (in a decreasing order). /// </summary> public void SortForPostman() { sortedlist = Deliverables.ToList(); sortedlist1 = Deliverables.ToList(); int N = sortedlist.Count; foreach (Deliverable s in sortedlist.ToList()) { if (s.Buyer.Housenumber % 2 == 0) { sortedlist.Remove(s); } } oddsortedlist = sortedlist; foreach (Deliverable s in sortedlist1.ToList()) { if (s.Buyer.Housenumber % 2 != 0) { sortedlist1.Remove(s); } } evensortedlist = sortedlist1; int f, d; N = oddsortedlist.Count; for (d = N - 1; d > 0; d--) { for (f = 0; f < d; f++) { if (string.Compare((oddsortedlist[f].Buyer.Street), (oddsortedlist[f + 1].Buyer.Street)) == 0) { if (oddsortedlist[f].Buyer.Housenumber > oddsortedlist[f + 1].Buyer.Housenumber) { swapodd(f, f + 1); } } else if (string.Compare((oddsortedlist[f].Buyer.Street), (oddsortedlist[f + 1].Buyer.Street)) > 0) { swapodd(f, f + 1); } } } int q, w; N = evensortedlist.Count; for (w = N - 1; w > 0; w--) { for (q = 0; q < w; q++) { if (string.Compare((evensortedlist[q].Buyer.Street), (evensortedlist[q + 1].Buyer.Street)) == 0) { if (evensortedlist[q].Buyer.Housenumber < evensortedlist[q + 1].Buyer.Housenumber) { swapeven(q, q + 1); } } else if (string.Compare((evensortedlist[q].Buyer.Street), (evensortedlist[q + 1].Buyer.Street)) > 0) { swapeven(q, q + 1); } } } sortedlist = oddsortedlist.ToList(); sortedlist.AddRange(evensortedlist.ToList()); int x, j; N = sortedlist.Count; for (j = N - 1; j > 0; j--) { for (x = 0; x < j; x++) { if (string.Compare((sortedlist[x].Buyer.Street), (sortedlist[x + 1].Buyer.Street)) > 0) { swapdeliverable(x, x + 1); } } } }
/// <summary> /// Dependent type names of this entity /// </summary> public void DeleteChildren(DatabaseEntities dbContext) { foreach (var x in ActionItemsWhereYouAreTheAssignedToPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in AuditLogs.ToList()) { x.DeleteFull(dbContext); } foreach (var x in DocumentLibraryDocumentsWhereYouAreTheLastUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in EvaluationsWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FileResourceInfosWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FirmaSessions.ToList()) { x.DeleteFull(dbContext); } foreach (var x in FirmaSessionsWhereYouAreTheOriginalPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ImportExternalProjectStagingsWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in Notifications.ToList()) { x.DeleteFull(dbContext); } foreach (var x in OrganizationsWhereYouAreThePrimaryContactPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureNotesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PerformanceMeasureNotesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PersonLoginAccounts.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PersonSettingGridColumnSettings.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PersonStewardGeospatialAreas.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PersonStewardOrganizations.ToList()) { x.DeleteFull(dbContext); } foreach (var x in PersonStewardTaxonomyBranches.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectsWhereYouAreThePrimaryContactPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectsWhereYouAreTheProposingPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectsWhereYouAreTheReviewedByPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectsWhereYouAreTheSubmittedByPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectContactsWhereYouAreTheContact.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectContactUpdatesWhereYouAreTheContact.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectInternalNotesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectInternalNotesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocationStagings.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectLocationStagingUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNotesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNotesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoteUpdatesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectNoteUpdatesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectProjectStatusesWhereYouAreTheProjectProjectStatusCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectProjectStatusesWhereYouAreTheProjectProjectStatusLastEditedPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectUpdatesWhereYouAreThePrimaryContactPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectUpdateBatchesWhereYouAreTheLastUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ProjectUpdateHistoriesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ReleaseNotesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ReleaseNotesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SubbasinLiasons.ToList()) { x.DeleteFull(dbContext); } foreach (var x in SupportRequestLogsWhereYouAreTheRequestPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TechnicalAssistanceRequests.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TechnicalAssistanceRequestUpdates.ToList()) { x.DeleteFull(dbContext); } foreach (var x in TenantAttributesWhereYouAreThePrimaryContactPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ImpProcessingsWhereYouAreTheLastProcessedPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ImpProcessingsWhereYouAreTheUploadPerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in CostAuthorityObligationRequestsWhereYouAreTheTechnicalRepresentativePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in Deliverables.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ObligationRequestsWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ObligationRequestsWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ObligationRequestSubmissionNotesWhereYouAreTheCreatePerson.ToList()) { x.DeleteFull(dbContext); } foreach (var x in ObligationRequestSubmissionNotesWhereYouAreTheUpdatePerson.ToList()) { x.DeleteFull(dbContext); } }