private void FixupSalesPerson(SalesPerson previousValue) { if (previousValue != null && previousValue.SalesTerritoryHistories.Contains(this)) { previousValue.SalesTerritoryHistories.Remove(this); } if (SalesPerson != null) { if (!SalesPerson.SalesTerritoryHistories.Contains(this)) { SalesPerson.SalesTerritoryHistories.Add(this); } if (SalesPersonID != SalesPerson.SalesPersonID) { SalesPersonID = SalesPerson.SalesPersonID; } } }
private void FixupSalesPerson(SalesPerson previousValue) { if (previousValue != null && previousValue.SalesPersonQuotaHistories.Contains(this)) { previousValue.SalesPersonQuotaHistories.Remove(this); } if (SalesPerson != null) { if (!SalesPerson.SalesPersonQuotaHistories.Contains(this)) { SalesPerson.SalesPersonQuotaHistories.Add(this); } if (SalesPersonID != SalesPerson.SalesPersonID) { SalesPersonID = SalesPerson.SalesPersonID; } } }
private void FixupSalesPerson(SalesPerson previousValue) { if (previousValue != null && previousValue.Stores.Contains(this)) { previousValue.Stores.Remove(this); } if (SalesPerson != null) { if (!SalesPerson.Stores.Contains(this)) { SalesPerson.Stores.Add(this); } if (SalesPersonID != SalesPerson.SalesPersonID) { SalesPersonID = SalesPerson.SalesPersonID; } } else if (!_settingFK) { SalesPersonID = null; } }
private void FixupSalesPerson(SalesPerson previousValue) { if (previousValue != null && previousValue.SalesOrderHeaders.Contains(this)) { previousValue.SalesOrderHeaders.Remove(this); } if (SalesPerson != null) { if (!SalesPerson.SalesOrderHeaders.Contains(this)) { SalesPerson.SalesOrderHeaders.Add(this); } if (SalesPersonID != SalesPerson.SalesPersonID) { SalesPersonID = SalesPerson.SalesPersonID; } } else if (!_settingFK) { SalesPersonID = null; } }
private void FixupSalesPerson(SalesPerson previousValue) { if (previousValue != null && ReferenceEquals(previousValue.Employee, this)) { previousValue.Employee = null; } if (SalesPerson != null) { SalesPerson.Employee = this; } }