Esempio n. 1
0
        private void uxProductNew_Click(object sender, RoutedEventArgs e)
        {
            var window = new ProductWindow();

            if (true == window.ShowDialog())
            {
                var uiModel         = window.Product;
                var repositoryModel = uiModel.ToRepositoryModel();
                App.InventoryRepository.Add(repositoryModel);
                LoadProducts();
            }
        }
Esempio n. 2
0
        private void uxProductChange_Click(object sender, RoutedEventArgs e)
        {
            var window = new ProductWindow();

            window.Product = selectedProduct.Clone();

            if (true == window.ShowDialog())
            {
                App.InventoryRepository.Update(window.Product.ToRepositoryModel());
                LoadProducts();
            }
        }