private void FixupLocation(Location previousValue) { if (previousValue != null && previousValue.ProductInventories.Contains(this)) { previousValue.ProductInventories.Remove(this); } if (Location != null) { if (!Location.ProductInventories.Contains(this)) { Location.ProductInventories.Add(this); } if (LocationID != Location.LocationID) { LocationID = Location.LocationID; } } }
private void FixupLocation(Location previousValue) { if (previousValue != null && previousValue.WorkOrderRoutings.Contains(this)) { previousValue.WorkOrderRoutings.Remove(this); } if (Location != null) { if (!Location.WorkOrderRoutings.Contains(this)) { Location.WorkOrderRoutings.Add(this); } if (LocationID != Location.LocationID) { LocationID = Location.LocationID; } } }