private void FixupCustomers(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.NewItems != null)
{
foreach (Customer item in e.NewItems)
{
item.Employee = this;
}
}
if (e.OldItems != null)
{
foreach (Customer item in e.OldItems)
{
if (ReferenceEquals(item.Employee, this))
{
item.Employee = null;
}
}
}
}