Example #1
0
        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();
        }
Example #2
0
        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();
        }