public void Execute(object parameter)
        {
            _catalog.Delete(_customerMasterDetailsView.ItemViewModelSelected.DomainObject.Key);

            _customerMasterDetailsView.ItemViewModelSelected = null;

            _customerMasterDetailsView.RefreshCustomerItemViewModelCollection();

            _catalog.Save();
        }
Example #2
0
 public void Execute(object parameter)
 {
     _catalog.Delete(_customerMasterDetailsViewModel.ItemViewModelSelected.Key);
     _catalog.Create(new Customer(_customerMasterDetailsViewModel.ItemViewModelSelected.CVR,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.FirstName,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.LastName,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.EmailAddress,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.PhoneNumber,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.Address,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.City,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.AreaCode,
                                  _customerMasterDetailsViewModel.ItemViewModelSelected.Info));
     _customerMasterDetailsViewModel.RefreshCustomerItemViewModelCollection();
     _catalog.Save();
 }
Example #3
0
        public void DeleteOrder()
        {
            _orderCatalog.Delete(_orderFK).Wait();
            _customerCatalog.Delete(_customerFK).Wait();

            Order _order;

            _orderCatalog.Data.TryGetValue(_orderFK, out _order);

            Customer _customer;

            _customerCatalog.Data.TryGetValue(_customerFK, out _customer);

            Assert.AreEqual(null, _order);
            Assert.AreEqual(null, _customer);
        }
Example #4
0
 public void Execute(object parameter)
 {
     _catalog.Delete(_customerVM.SelectedCustomer);
     _customerVM.Refresh();
     _catalog.SaveCustomer();
 }
Example #5
0
        public async void Clear(int CustomerFK, int OrderFK)
        {
            await _customerCatalog.Delete(CustomerFK);

            await _orderCatalog.Delete(OrderFK);
        }