Пример #1
0
 public static void BaseDelete(this Payment @this, DeletableDelete method)
 {
     foreach (PaymentApplication paymentApplication in @this.PaymentApplications)
     {
         paymentApplication.Delete();
     }
 }
 public static void BaseDelete(this InventoryItem @this, DeletableDelete method)
 {
     foreach (InventoryOwnership inventoryOwnership in @this.InventoryOwnershipsWhereInventoryItem)
     {
         inventoryOwnership.Delete();
     }
 }
Пример #3
0
 public void BaseDelete(DeletableDelete method)
 {
     if (this.ExistMediaContent)
     {
         this.MediaContent.Delete();
     }
 }
Пример #4
0
 public void AppsDelete(DeletableDelete method)
 {
     if (this.ExistTimeEntries)
     {
         throw new Exception("Cannot delete TimeSheet due to associated TimeEntry details");
     }
 }
Пример #5
0
 public void BaseDelete(DeletableDelete method)
 {
     foreach (Employment employment in this.EmploymentsWhereEmployer)
     {
         employment.Delete();
     }
 }
Пример #6
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (ProductIdentification productIdentification in this.ProductIdentifications)
                {
                    productIdentification.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedNames)
                {
                    localisedText.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedDescriptions)
                {
                    localisedText.Delete();
                }

                foreach (PriceComponent priceComponent in this.VirtualProductPriceComponents)
                {
                    priceComponent.Delete();
                }

                foreach (EstimatedProductCost estimatedProductCosts in this.EstimatedProductCosts)
                {
                    estimatedProductCosts.Delete();
                }
            }
        }
Пример #7
0
        public void BaseDelete(DeletableDelete method)
        {
            // HACK: DerivedRoles
            ((ProductDerivedRoles)this.Product).RemoveBasePrice(this);

            this.ProductFeature.RemoveFromBasePrices(this);
        }
 public void BaseDelete(DeletableDelete method)
 {
     foreach (InventoryItemVersion version in this.AllVersions)
     {
         version.Delete();
     }
 }
Пример #9
0
 public static void CoreDelete(this Task @this, DeletableDelete method)
 {
     foreach (TaskAssignment taskAssignment in @this.TaskAssignmentsWhereTask)
     {
         taskAssignment.Delete();
     }
 }
Пример #10
0
 public static void BaseDelete(this CommunicationEvent @this, DeletableDelete method)
 {
     foreach (Task task in @this.TasksWhereWorkItem)
     {
         task.Delete();
     }
 }
Пример #11
0
        public void BaseDelete(DeletableDelete method)
        {
            var session    = this.strategy.Session;
            var derivation = new Derivations.Default.Derivation(session);

            this.SyncInventoryTransactions(derivation, this.InventoryItem, this.Quantity, new InventoryTransactionReasons(session).Consumption, true);
        }
Пример #12
0
        public void AppsDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                if (this.ExistShippingAndHandlingCharge)
                {
                    this.ShippingAndHandlingCharge.Delete();
                }

                if (this.ExistFee)
                {
                    this.Fee.Delete();
                }

                if (this.ExistDiscountAdjustment)
                {
                    this.DiscountAdjustment.Delete();
                }

                if (this.ExistSurchargeAdjustment)
                {
                    this.SurchargeAdjustment.Delete();
                }

                foreach (SalesInvoiceItem salesInvoiceItem in this.SalesInvoiceItems)
                {
                    salesInvoiceItem.Delete();
                }

                foreach (SalesTerm salesTerm in this.SalesTerms)
                {
                    salesTerm.Delete();
                }
            }
        }
Пример #13
0
        public void BaseDelete(DeletableDelete method)
        {
            if (!this.IsDeletable)
            {
                return;
            }

            foreach (OrganisationContactRelationship deletable in this.OrganisationContactRelationshipsWhereContact)
            {
                deletable.Delete();
            }

            foreach (ProfessionalServicesRelationship deletable in this.ProfessionalServicesRelationshipsWhereProfessional)
            {
                deletable.Delete();
            }

            foreach (PartyFinancialRelationship deletable in this.PartyFinancialRelationshipsWhereParty)
            {
                deletable.Delete();
            }

            foreach (PartyContactMechanism deletable in this.PartyContactMechanisms)
            {
                var contactmechanism = deletable.ContactMechanism;

                deletable.Delete();

                if (!contactmechanism.ExistPartyContactMechanismsWhereContactMechanism)
                {
                    contactmechanism.Delete();
                }
            }

            foreach (CommunicationEvent deletable in this.CommunicationEventsWhereInvolvedParty)
            {
                deletable.Delete();
            }

            foreach (OrganisationContactRelationship deletable in this.OrganisationContactRelationshipsWhereContact)
            {
                deletable.Delete();
            }

            if (this.ExistTimeSheetWhereWorker)
            {
                this.TimeSheetWhereWorker.Delete();
            }

            if (this.ExistOwnerAccessControl)
            {
                this.OwnerAccessControl.Delete();
            }

            if (this.ExistOwnerSecurityToken)
            {
                this.OwnerSecurityToken.Delete();
            }
        }
Пример #14
0
 public void AppsDelete(DeletableDelete method)
 {
     //TODO: Restrit Delete?
     foreach (SerialisedItemVersion version in this.AllVersions)
     {
         version.Delete();
     }
 }
Пример #15
0
        public static void AppsDelete(this CommunicationEvent @this, DeletableDelete method)
        {
            foreach (CommunicationEventStatus communicationEventStatus in @this.CommunicationEventStatuses)
            {
                communicationEventStatus.Delete();
            }

            @this.RemoveWorkEfforts();
        }
Пример #16
0
 public static void BaseDelete(this Request @this, DeletableDelete method)
 {
     if (@this.IsDeletable())
     {
         foreach (RequestItem item in @this.RequestItems)
         {
             item.Delete();
         }
     }
 }
Пример #17
0
 public void BaseDelete(DeletableDelete method)
 {
     if (this.ExistItemIssuancesWhereShipmentItem)
     {
         foreach (ItemIssuance itemIssuance in this.ItemIssuancesWhereShipmentItem)
         {
             itemIssuance.Delete();
         }
     }
 }
Пример #18
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (ProductIdentification productIdentification in this.ProductIdentifications)
                {
                    productIdentification.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedNames)
                {
                    localisedText.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedDescriptions)
                {
                    localisedText.Delete();
                }

                foreach (PriceComponent priceComponent in this.VirtualProductPriceComponents)
                {
                    priceComponent.Delete();
                }

                foreach (EstimatedProductCost estimatedProductCosts in this.EstimatedProductCosts)
                {
                    estimatedProductCosts.Delete();
                }

                foreach (ProductFeatureApplicability productFeatureApplicability in this.ProductFeatureApplicabilitiesWhereAvailableFor)
                {
                    productFeatureApplicability.Delete();
                }

                foreach (InventoryItem inventoryItem in this.InventoryItemsWherePart)
                {
                    inventoryItem.Delete();
                }

                foreach (PartSubstitute partSubstitute in this.PartSubstitutesWherePart)
                {
                    partSubstitute.Delete();
                }

                foreach (PartSubstitute partSubstitute in this.PartSubstitutesWhereSubstitutionPart)
                {
                    partSubstitute.Delete();
                }

                foreach (SupplierOffering supplierOffering in this.SupplierOfferingsWherePart)
                {
                    supplierOffering.Delete();
                }
            }
        }
Пример #19
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (LocalisedText deletable in this.LocalisedComments)
                {
                    deletable.Delete();
                }

                foreach (LocalisedText deletable in this.LocalisedNames)
                {
                    deletable.Delete();
                }

                foreach (LocalisedText deletable in this.LocalisedDescriptions)
                {
                    deletable.Delete();
                }

                foreach (LocalisedText deletable in this.LocalisedKeywords)
                {
                    deletable.Delete();
                }

                foreach (Media deletable in this.PublicElectronicDocuments)
                {
                    deletable.Delete();
                }

                foreach (Media deletable in this.PublicLocalisedElectronicDocuments)
                {
                    deletable.Delete();
                }

                foreach (Media deletable in this.PrivateElectronicDocuments)
                {
                    deletable.Delete();
                }

                foreach (Media deletable in this.PrivateLocalisedElectronicDocuments)
                {
                    deletable.Delete();
                }

                foreach (SerialisedItemCharacteristic deletable in this.SerialisedItemCharacteristics)
                {
                    deletable.Delete();
                }

                foreach (SerialisedItemVersion version in this.AllVersions)
                {
                    version.Delete();
                }
            }
        }
Пример #20
0
        public static void CoreDelete(this User @this, DeletableDelete method)
        {
            @this.OwnerAccessControl?.Delete();
            @this.OwnerSecurityToken?.Delete();
            foreach (Login login in @this.Logins)
            {
                login.Delete();
            }

            @this.NotificationList?.Delete();
        }
 public void BaseDelete(DeletableDelete method)
 {
     if (this.PurchaseInvoiceWherePurchaseInvoiceItem.PurchaseInvoiceState.IsCreated)
     {
         this.PurchaseInvoiceWherePurchaseInvoiceItem.RemovePurchaseInvoiceItem(this);
         foreach (OrderItemBilling orderItemBilling in this.OrderItemBillingsWhereInvoiceItem)
         {
             orderItemBilling.Delete();
         }
     }
 }
Пример #22
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistInvoice)
            {
                this.Invoice.DerivationTrigger = Guid.NewGuid();
            }

            if (this.ExistInvoiceItem)
            {
                this.InvoiceItem.DerivationTrigger = Guid.NewGuid();
            }
        }
Пример #23
0
        public void BaseDelete(DeletableDelete method)
        {
            foreach (InventoryItemVersion version in this.AllVersions)
            {
                version.Delete();
            }

            foreach (InventoryItemTransaction transaction in this.InventoryItemTransactionsWhereInventoryItem)
            {
                transaction.Delete();
            }
        }
Пример #24
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistOwnerSecurityToken)
            {
                foreach (AccessControl acl in this.OwnerSecurityToken.AccessControlsWhereObject)
                {
                    acl.Delete();
                }

                this.OwnerSecurityToken.Delete();
            }
        }
Пример #25
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistOwnerAccessControl)
            {
                this.OwnerAccessControl.Delete();
            }

            if (this.ExistOwnerSecurityToken)
            {
                this.OwnerSecurityToken.Delete();
            }
        }
Пример #26
0
        public void AppsDelete(DeletableDelete method)
        {
            foreach (SalesTerm salesTerm in this.SalesTerms)
            {
                salesTerm.Delete();
            }

            foreach (InvoiceVatRateItem invoiceVatRateItem in this.InvoiceVatRateItems)
            {
                invoiceVatRateItem.Delete();
            }
        }
Пример #27
0
        public void AppsDelete(DeletableDelete method)
        {
            if (!this.IsDeletable)
            {
                return;
            }

            foreach (PartyFinancialRelationship partyFinancialRelationship in this.PartyFinancialRelationshipsWhereParty)
            {
                partyFinancialRelationship.Delete();
            }

            foreach (PartyContactMechanism partyContactMechanism in this.PartyContactMechanisms)
            {
                partyContactMechanism.ContactMechanism.Delete();
            }

            foreach (CommunicationEvent communicationEvent in this.CommunicationEventsWhereInvolvedParty)
            {
                communicationEvent.Delete();
            }

            foreach (OrganisationContactRelationship contactRelationship in this.OrganisationContactRelationshipsWhereContact)
            {
                contactRelationship.Delete();
            }

            if (this.ExistTimeSheetWhereWorker)
            {
                this.TimeSheetWhereWorker.Delete();
            }

            if (this.ExistOwnerAccessControl)
            {
                this.OwnerAccessControl.Delete();
            }

            if (this.ExistOwnerSecurityToken)
            {
                this.OwnerSecurityToken.Delete();
            }
        }
Пример #28
0
        public void BaseDelete(DeletableDelete method)
        {
            foreach (SalesTerm salesTerm in this.SalesTerms)
            {
                salesTerm.Delete();
            }

            foreach (InvoiceVatRateItem invoiceVatRateItem in this.InvoiceVatRateItems)
            {
                invoiceVatRateItem.Delete();
            }

            foreach (WorkEffortBilling billing in this.WorkEffortBillingsWhereInvoiceItem)
            {
                billing.WorkEffort.DerivationTrigger = Guid.NewGuid();
                billing.Delete();
            }

            foreach (OrderItemBilling billing in this.OrderItemBillingsWhereInvoiceItem)
            {
                billing.OrderItem.DerivationTrigger = Guid.NewGuid();
                billing.Delete();
            }

            foreach (ShipmentItemBilling billing in this.ShipmentItemBillingsWhereInvoiceItem)
            {
                billing.ShipmentItem.DerivationTrigger = Guid.NewGuid();
                billing.Delete();
            }

            foreach (TimeEntryBilling billing in this.TimeEntryBillingsWhereInvoiceItem)
            {
                billing.TimeEntry.WorkEffort.DerivationTrigger = Guid.NewGuid();
                billing.Delete();
            }

            foreach (ServiceEntryBilling billing in this.ServiceEntryBillingsWhereInvoiceItem)
            {
                billing.ServiceEntry.DerivationTrigger = Guid.NewGuid();
                billing.Delete();
            }
        }
Пример #29
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (OrderAdjustment orderAdjustment in this.OrderAdjustments)
                {
                    orderAdjustment.Delete();
                }

                foreach (PurchaseInvoiceItem invoiceItem in this.PurchaseInvoiceItems)
                {
                    invoiceItem.Delete();
                }

                foreach (SalesTerm salesTerm in this.SalesTerms)
                {
                    salesTerm.Delete();
                }
            }
        }
Пример #30
0
        public static void BaseDelete(this Quote @this, DeletableDelete method)
        {
            var productQuote    = @this as ProductQuote;
            var propasal        = @this as Proposal;
            var statementOfWork = @this as StatementOfWork;

            if ((productQuote != null && productQuote.IsDeletable) ||
                (propasal != null && propasal.IsDeletable) ||
                (statementOfWork != null && statementOfWork.IsDeletable))
            {
                foreach (OrderAdjustment orderAdjustment in @this.OrderAdjustments)
                {
                    orderAdjustment.Delete();
                }

                foreach (QuoteItem item in @this.QuoteItems)
                {
                    item.Delete();
                }
            }
        }
Пример #31
0
        public void AppsDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (PartyFinancialRelationship partyFinancialRelationship in this.PartyFinancialRelationshipsWhereParty)
                {
                    partyFinancialRelationship.Delete();
                }

                foreach (PartyContactMechanism partyContactMechanism in this.PartyContactMechanisms)
                {
                    partyContactMechanism.ContactMechanism.Delete();
                    partyContactMechanism.Delete();
                }

                foreach (OrganisationContactRelationship organisationContactRelationship in this.OrganisationContactRelationshipsWhereOrganisation)
                {
                    organisationContactRelationship.Contact.Delete();
                }
            }
        }
Пример #32
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (ProductIdentification productIdentification in this.ProductIdentifications)
                {
                    productIdentification.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedNames)
                {
                    localisedText.Delete();
                }

                foreach (LocalisedText localisedText in this.LocalisedDescriptions)
                {
                    localisedText.Delete();
                }

                foreach (InventoryItem inventoryItem in this.InventoryItemsWherePart)
                {
                    inventoryItem.Delete();
                }

                foreach (PartSubstitute partSubstitute in this.PartSubstitutesWherePart)
                {
                    partSubstitute.Delete();
                }

                foreach (PartSubstitute partSubstitute in this.PartSubstitutesWhereSubstitutionPart)
                {
                    partSubstitute.Delete();
                }

                foreach (SupplierOffering supplierOffering in this.SupplierOfferingsWherePart)
                {
                    supplierOffering.Delete();
                }
            }
        }
Пример #33
0
        public static void BaseDelete(this Quote @this, DeletableDelete method)
        {
            var productQuote    = @this as ProductQuote;
            var propasal        = @this as Proposal;
            var statementOfWork = @this as StatementOfWork;

            if ((productQuote != null && productQuote.IsDeletable) ||
                (propasal != null && propasal.IsDeletable) ||
                (statementOfWork != null && statementOfWork.IsDeletable))
            {
                if (@this.ExistShippingAndHandlingCharge)
                {
                    @this.ShippingAndHandlingCharge.Delete();
                }

                if (@this.ExistFee)
                {
                    @this.Fee.Delete();
                }

                if (@this.ExistDiscountAdjustment)
                {
                    @this.DiscountAdjustment.Delete();
                }

                if (@this.ExistSurchargeAdjustment)
                {
                    @this.SurchargeAdjustment.Delete();
                }

                foreach (QuoteItem item in @this.QuoteItems)
                {
                    item.Delete();
                }
            }
        }
Пример #34
0
 public void BaseDelete(DeletableDelete method)
 {
     this.Original.Delete();
     this.Responsive.Delete();
     this.Thumbnail.Delete();
 }
Пример #35
0
 public void AppsDelete(DeletableDelete method)
 {
     this.Product.RemoveFromBasePrices(this);
     this.ProductFeature.RemoveFromBasePrices(this);
 }
Пример #36
0
        public void AppsDelete(DeletableDelete method)
        {
            if (this.IsDeletable)
            {
                foreach (PartyContactMechanism partyContactMechanism in this.PartyContactMechanisms)
                {
                    partyContactMechanism.ContactMechanism.Delete();
                    partyContactMechanism.Delete();
                }

                foreach (OrganisationContactRelationship organisationContactRelationship in this.OrganisationContactRelationshipsWhereOrganisation)
                {
                    organisationContactRelationship.Contact.Delete();
                }

                if (this.ExistOwnerSecurityToken)
                {
                    foreach (AccessControl acl in this.OwnerSecurityToken.AccessControlsWhereObject)
                    {
                        acl.Delete();
                    }

                    this.OwnerSecurityToken.Delete();
                }
            }
        }
Пример #37
0
 public void AppsDelete(DeletableDelete method)
 {
     this.PostalBoundary.Delete();
 }