Beispiel #1
0
        private void FixupPurchaseOrderHeader(PurchaseOrderHeader previousValue)
        {
            if (previousValue != null &&
                previousValue.PurchaseOrderDetails.Contains(this))
            {
                previousValue.PurchaseOrderDetails.Remove(this);
            }

            if (PurchaseOrderHeader != null)
            {
                if (!PurchaseOrderHeader.PurchaseOrderDetails.Contains(this))
                {
                    PurchaseOrderHeader.PurchaseOrderDetails.Add(this);
                }
                if (PurchaseOrderID != PurchaseOrderHeader.PurchaseOrderID)
                {
                    PurchaseOrderID = PurchaseOrderHeader.PurchaseOrderID;
                }
            }
        }
        private void FixupPurchaseOrderHeader(PurchaseOrderHeader previousValue)
        {
            if (previousValue != null
                && previousValue.PurchaseOrderDetails.Contains(this))
            {
                previousValue.PurchaseOrderDetails.Remove(this);
            }

            if (PurchaseOrderHeader != null)
            {
                if (!PurchaseOrderHeader.PurchaseOrderDetails.Contains(this))
                {
                    PurchaseOrderHeader.PurchaseOrderDetails.Add(this);
                }
                if (PurchaseOrderID != PurchaseOrderHeader.PurchaseOrderID)
                {
                    PurchaseOrderID = PurchaseOrderHeader.PurchaseOrderID;
                }
            }
        }