Пример #1
0
        private void FixupSpecialOfferProduct(SpecialOfferProduct previousValue)
        {
            if (previousValue != null &&
                previousValue.SalesOrderDetails.Contains(this))
            {
                previousValue.SalesOrderDetails.Remove(this);
            }

            if (SpecialOfferProduct != null)
            {
                if (!SpecialOfferProduct.SalesOrderDetails.Contains(this))
                {
                    SpecialOfferProduct.SalesOrderDetails.Add(this);
                }
                if (SpecialOfferID != SpecialOfferProduct.SpecialOfferID)
                {
                    SpecialOfferID = SpecialOfferProduct.SpecialOfferID;
                }
                if (ProductID != SpecialOfferProduct.ProductID)
                {
                    ProductID = SpecialOfferProduct.ProductID;
                }
            }
        }
Пример #2
0
        private void FixupSpecialOfferProduct(SpecialOfferProduct previousValue)
        {
            if (previousValue != null
                && previousValue.SalesOrderDetails.Contains(this))
            {
                previousValue.SalesOrderDetails.Remove(this);
            }

            if (SpecialOfferProduct != null)
            {
                if (!SpecialOfferProduct.SalesOrderDetails.Contains(this))
                {
                    SpecialOfferProduct.SalesOrderDetails.Add(this);
                }
                if (SpecialOfferID != SpecialOfferProduct.SpecialOfferID)
                {
                    SpecialOfferID = SpecialOfferProduct.SpecialOfferID;
                }
                if (ProductID != SpecialOfferProduct.ProductID)
                {
                    ProductID = SpecialOfferProduct.ProductID;
                }
            }
        }