Exemple #1
0
 private void UpdateCustomer(SimpleEditableCustomer source, Customer target)
 {
     target.FirstName = source.FirstName;
     target.LastName  = source.LastName;
     target.Phone     = source.Phone;
     target.Email     = source.Email;
     target.Address   = source.Address;
 }
Exemple #2
0
 private void CopyCustomer(Customer source, SimpleEditableCustomer target)
 {
     target.Id = source.Id;
     if (EditMode)
     {
         target.FirstName = source.FirstName;
         target.LastName  = source.LastName;
         target.Phone     = source.Phone;
         target.Email     = source.Email;
         target.Address   = source.Address;
     }
 }
Exemple #3
0
 public void SetCustomer(Customer cust)
 {
     try
     {
         _editingCustomer = cust;
         if (Customer != null)
         {
             Customer.ErrorsChanged -= RaiseCanExecuteChanged;
         }
         Customer = new SimpleEditableCustomer();
         Customer.ErrorsChanged += RaiseCanExecuteChanged;
         CopyCustomer(cust, Customer);
     }
     catch (Exception e)
     {
         Logger.Error(e);
     }
 }