Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 private void AddAddressButtonClick(object sender, RoutedEventArgs e)
 {
     var newAddress = new Address();
     ContactData.AddAddress(newAddress);
     RebindContact();
 }
Esempio n. 4
0
 public virtual void DelAddress(Address addressToDelete)
 {
     Addresses.Remove(addressToDelete);
     Database.DatabaseAccess.SaveOrUpdate(this);
 }
Esempio n. 5
0
 public virtual void AddAddress(Address addressToAdd)
 {
     Addresses.Add(addressToAdd);
     Database.DatabaseAccess.SaveOrUpdate(this);
 }
Esempio n. 6
0
 private void EditButtonClick(object sender, RoutedEventArgs e)
 {
     preEditAddress = (Address)Addres.Clone();
     EditMode = true;
 }