private void UpdateCustomer(EditableCustomer target,Customer customer) { customer.FirstName = target.FirstName; customer.LastName = target.LastName; customer.Phone = target.Phone; customer.Email = target.Email; }
public void SetCustomer(Customer customer) { _editingCustomer = customer; Customer = new EditableCustomer(); CopyCustomer(customer, Customer); if (Customer != null) Customer.ErrorsChanged -= RaiseCanExecuteChanged; Customer.ErrorsChanged += RaiseCanExecuteChanged; }
public void CopyCustomer(Customer customer, EditableCustomer target) { target.Id = customer.Id; if (EditMode) { target.FirstName = customer.FirstName; target.LastName = customer.LastName; target.Phone = customer.Phone; target.Email = customer.Email; } }