コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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;
                }
            }
        }