public virtual void SetValues(Address sourceValues) { if (sourceValues == null) { return; } Country = sourceValues.Country; Province = sourceValues.Province; District = sourceValues.District; Commune = sourceValues.Commune; City = sourceValues.City; PostOffice = sourceValues.PostOffice; PostalCode = sourceValues.PostalCode; Street = sourceValues.Street; BuildingNumber = sourceValues.BuildingNumber; ApartmentNumber = sourceValues.ApartmentNumber; }
private void AddAddressClick(object sender, RoutedEventArgs e) { var newAddress = new Address(); DatabaseAccess.SaveOrUpdate(newAddress); if(SourceCompany.Addresses == null) { SourceCompany.Addresses = new List<Address>(); } SourceCompany.Addresses.Add(newAddress); DatabaseAccess.SaveOrUpdate(SourceCompany); RebindCompany(); }
private void AddAddressButtonClick(object sender, RoutedEventArgs e) { var newAddress = new Address(); ContactData.AddAddress(newAddress); RebindContact(); }
public virtual void DelAddress(Address addressToDelete) { Addresses.Remove(addressToDelete); Database.DatabaseAccess.SaveOrUpdate(this); }
public virtual void AddAddress(Address addressToAdd) { Addresses.Add(addressToAdd); Database.DatabaseAccess.SaveOrUpdate(this); }
private void EditButtonClick(object sender, RoutedEventArgs e) { preEditAddress = (Address)Addres.Clone(); EditMode = true; }