private void FixupAddress1(Address previousValue) { if (previousValue != null && previousValue.SalesOrderHeaders1.Contains(this)) { previousValue.SalesOrderHeaders1.Remove(this); } if (Address1 != null) { if (!Address1.SalesOrderHeaders1.Contains(this)) { Address1.SalesOrderHeaders1.Add(this); } if (ShipToAddressID != Address1.AddressID) { ShipToAddressID = Address1.AddressID; } } }
private void FixupAddress(Address previousValue) { if (previousValue != null && previousValue.BusinessEntityAddresses.Contains(this)) { previousValue.BusinessEntityAddresses.Remove(this); } if (Address != null) { if (!Address.BusinessEntityAddresses.Contains(this)) { Address.BusinessEntityAddresses.Add(this); } if (AddressID != Address.AddressID) { AddressID = Address.AddressID; } } }
private void FixupAddress(Address previousValue) { if (previousValue != null && previousValue.SalesOrderHeaders.Contains(this)) { previousValue.SalesOrderHeaders.Remove(this); } if (Address != null) { if (!Address.SalesOrderHeaders.Contains(this)) { Address.SalesOrderHeaders.Add(this); } if (BillToAddressID != Address.AddressID) { BillToAddressID = Address.AddressID; } } }