Ejemplo n.º 1
0
        private void EditCustomer()
        {
            var vm = new EditCustomerViewModel(new UnitOfWorkFactory(), SelectedCustomer);

            vm.Init();
            var window = new EditCustomerView(vm);

            if (window.ShowDialog() ?? false)
            {
                CollectionViewSource.GetDefaultView(CustomerList).Refresh();
            }
        }
Ejemplo n.º 2
0
        private void NewCustomer()
        {
            var customer = new Customer();
            var vm       = new EditCustomerViewModel(new UnitOfWorkFactory(), customer);

            vm.Init();
            var window = new EditCustomerView(vm);

            if (window.ShowDialog() ?? false)
            {
                CustomerList.Add(customer);
            }
        }