Esempio n. 1
0
        private void FixupVendor(Vendor previousValue)
        {
            if (previousValue != null && previousValue.ProductVendors.Contains(this))
            {
                previousValue.ProductVendors.Remove(this);
            }

            if (Vendor != null)
            {
                if (!Vendor.ProductVendors.Contains(this))
                {
                    Vendor.ProductVendors.Add(this);
                }
                if (BusinessEntityID != Vendor.BusinessEntityID)
                {
                    BusinessEntityID = Vendor.BusinessEntityID;
                }
            }
        }
        private void FixupVendor(Vendor previousValue)
        {
            if (previousValue != null && previousValue.PurchaseOrderHeaders.Contains(this))
            {
                previousValue.PurchaseOrderHeaders.Remove(this);
            }

            if (Vendor != null)
            {
                if (!Vendor.PurchaseOrderHeaders.Contains(this))
                {
                    Vendor.PurchaseOrderHeaders.Add(this);
                }
                if (VendorID != Vendor.BusinessEntityID)
                {
                    VendorID = Vendor.BusinessEntityID;
                }
            }
        }
        private void FixupVendor(Vendor previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.BusinessEntity, this))
            {
                previousValue.BusinessEntity = null;
            }

            if (Vendor != null)
            {
                Vendor.BusinessEntity = this;
            }
        }