Esempio n. 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();
     }
 }
Esempio n. 3
0
 public void BaseDelete(DeletableDelete method)
 {
     if (this.ExistMediaContent)
     {
         this.MediaContent.Delete();
     }
 }
Esempio n. 4
0
 public void AppsDelete(DeletableDelete method)
 {
     if (this.ExistTimeEntries)
     {
         throw new Exception("Cannot delete TimeSheet due to associated TimeEntry details");
     }
 }
Esempio n. 5
0
 public void BaseDelete(DeletableDelete method)
 {
     foreach (Employment employment in this.EmploymentsWhereEmployer)
     {
         employment.Delete();
     }
 }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
     }
 }
Esempio n. 9
0
 public static void CoreDelete(this Task @this, DeletableDelete method)
 {
     foreach (TaskAssignment taskAssignment in @this.TaskAssignmentsWhereTask)
     {
         taskAssignment.Delete();
     }
 }
Esempio n. 10
0
 public static void BaseDelete(this CommunicationEvent @this, DeletableDelete method)
 {
     foreach (Task task in @this.TasksWhereWorkItem)
     {
         task.Delete();
     }
 }
Esempio n. 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);
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 14
0
 public void AppsDelete(DeletableDelete method)
 {
     //TODO: Restrit Delete?
     foreach (SerialisedItemVersion version in this.AllVersions)
     {
         version.Delete();
     }
 }
Esempio n. 15
0
        public static void AppsDelete(this CommunicationEvent @this, DeletableDelete method)
        {
            foreach (CommunicationEventStatus communicationEventStatus in @this.CommunicationEventStatuses)
            {
                communicationEventStatus.Delete();
            }

            @this.RemoveWorkEfforts();
        }
Esempio n. 16
0
 public static void BaseDelete(this Request @this, DeletableDelete method)
 {
     if (@this.IsDeletable())
     {
         foreach (RequestItem item in @this.RequestItems)
         {
             item.Delete();
         }
     }
 }
Esempio n. 17
0
 public void BaseDelete(DeletableDelete method)
 {
     if (this.ExistItemIssuancesWhereShipmentItem)
     {
         foreach (ItemIssuance itemIssuance in this.ItemIssuancesWhereShipmentItem)
         {
             itemIssuance.Delete();
         }
     }
 }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
         }
     }
 }
Esempio n. 22
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistInvoice)
            {
                this.Invoice.DerivationTrigger = Guid.NewGuid();
            }

            if (this.ExistInvoiceItem)
            {
                this.InvoiceItem.DerivationTrigger = Guid.NewGuid();
            }
        }
Esempio n. 23
0
        public void BaseDelete(DeletableDelete method)
        {
            foreach (InventoryItemVersion version in this.AllVersions)
            {
                version.Delete();
            }

            foreach (InventoryItemTransaction transaction in this.InventoryItemTransactionsWhereInventoryItem)
            {
                transaction.Delete();
            }
        }
Esempio n. 24
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistOwnerSecurityToken)
            {
                foreach (AccessControl acl in this.OwnerSecurityToken.AccessControlsWhereObject)
                {
                    acl.Delete();
                }

                this.OwnerSecurityToken.Delete();
            }
        }
Esempio n. 25
0
        public void BaseDelete(DeletableDelete method)
        {
            if (this.ExistOwnerAccessControl)
            {
                this.OwnerAccessControl.Delete();
            }

            if (this.ExistOwnerSecurityToken)
            {
                this.OwnerSecurityToken.Delete();
            }
        }
Esempio n. 26
0
        public void AppsDelete(DeletableDelete method)
        {
            foreach (SalesTerm salesTerm in this.SalesTerms)
            {
                salesTerm.Delete();
            }

            foreach (InvoiceVatRateItem invoiceVatRateItem in this.InvoiceVatRateItems)
            {
                invoiceVatRateItem.Delete();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 34
0
 public void BaseDelete(DeletableDelete method)
 {
     this.Original.Delete();
     this.Responsive.Delete();
     this.Thumbnail.Delete();
 }
Esempio n. 35
0
 public void AppsDelete(DeletableDelete method)
 {
     this.Product.RemoveFromBasePrices(this);
     this.ProductFeature.RemoveFromBasePrices(this);
 }
Esempio n. 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();
                }
            }
        }
Esempio n. 37
0
 public void AppsDelete(DeletableDelete method)
 {
     this.PostalBoundary.Delete();
 }