private void UpdateCustomer(SimpleEditableCustomer source, Customer target)
 {
     target.FirstName = source.FirstName;
     target.LastName  = source.LastName;
     target.Email     = source.Email;
     target.Phone     = source.Phone;
 }
 private void CopyCustomer(Customer source, SimpleEditableCustomer target)
 {
     target.Id = source.Id;
     if (this.EditMode)
     {
         target.FirstName = source.FirstName;
         target.LastName  = source.LastName;
         target.Email     = source.Email;
         target.Phone     = source.Phone;
     }
 }
Ejemplo n.º 3
0
 public void SetCustomer(Customer customer)
 {
     _editingCustomer = customer;
     if (Customer != null)
     {
         Customer.ErrorsChanged -= RaiseCanExecuteChanged;
     }
     Customer = new SimpleEditableCustomer();
     Customer.ErrorsChanged += RaiseCanExecuteChanged;
     CopyCustomer(customer, Customer);
 }
        public void SetCustomer(Customer customer)
        {
            this.editingCustomer = customer;
            if (this.Customer != null)
            {
                this.Customer.ErrorsChanged -= this.RaiseCanExecuteChanged;
            }

            this.Customer = new SimpleEditableCustomer();
            this.Customer.ErrorsChanged += this.RaiseCanExecuteChanged;
            this.CopyCustomer(customer, this.Customer);
        }