private void AfterCreateAddress(long addressType) { var addresses = AddressManager.GetRootAddressesByType((CustomAddressType)addressType); if (addressType == (long)CustomAddressType.Company) { this.AnyCompanyAddress = addresses.Count() > 0; CompanyAddresses.Clear(); CompanyAddresses.AddRange(addresses); } else { this.AnyCustomerAddress = addresses.Count() > 0; CustomerAddresses.Clear(); CustomerAddresses.AddRange(addresses); } }
protected virtual void ClearNavigationProperties() { CustomerAddresses.Clear(); SalesOrderHeaders.Clear(); }