Exemplo n.º 1
0
 public void CloneFrom(Customer customer)
 {
     ID = customer.ID;
     Name = customer.Name;
     PrimaryPhone = customer.PrimaryPhone;
     Website = customer.Website;
     PrimaryAddress.CloneFrom(customer.PrimaryAddress);
 }
Exemplo n.º 2
0
 protected BaseEditCustomerViewModel(string customerId)
 {
     Customer = new Customer();
     if (customerId != null)
     {
         var original = DataStore.GetCustomer(customerId);
         Customer.CloneFrom(original);
     }
 }
 public void Init(string customerId = null)
 {
     Customer = new Customer();
     if (customerId != null)
     {
         var original = DataStore.GetCustomer(customerId);
         Customer.CloneFrom(original);
     }
 }
 public void CreateCustomer(Customer customer)
 {
     _customers.Add(customer);
     Save();
 }
 public void UpdateCustomer(Customer customer)
 {
     var toUpdate = _customers.First(c => c.ID == customer.ID);
     toUpdate.CloneFrom(customer);
     Save();
 }
Exemplo n.º 6
0
 public DetailsCustomerViewModel(string customerId)
 {
     Customer = DataStore.GetCustomer(customerId);
 }
 public void Init(string customerId)
 {
     Customer = DataStore.GetCustomer(customerId);
 }
 public void DoCustomerSelect(Customer customer)
 {
     ShowViewModel<DetailsCustomerViewModel>(new { customerId = customer.ID });
 }
Exemplo n.º 9
0
 public void DoCustomerSelect(Customer customer)
 {
     RequestNavigate<DetailsCustomerViewModel>(new { customerId = customer.ID });
 }