private void Save() { if (Model.Customer.Id == 0) { Model.Customer = CustomerServiceAdapter.Execute(s => s.CreateNewCustomer(Model.Customer)); } else { Model.Customer = CustomerServiceAdapter.Execute(s => s.UpdateCustomer(Model.Customer)); } View.DialogResult = true; View.Close(); }
private void Save() { if (Model.Customer.Id == 0) { Model.Customer = CustomerServiceInstance.CreateNewCustomer(Model.Customer); } else { Model.Customer = CustomerServiceInstance.UpdateCustomer(Model.Customer); } View.DialogResult = true; View.Close(); }