Example #1
0
        private void DeleteBtn_Click(object sender, RoutedEventArgs e)
        {
            Product selectedProduct;

            selectedProduct = (Product)listBoxProducts.SelectedItem;
            if (selectedProduct != null)
            {
                _productControl.DeleteProduct(selectedProduct.ProductId);
                UpdateListBoxProducts();
            }
        }
Example #2
0
 public void DeleteProduct(int productId)
 {
     productControl.DeleteProduct(productId);
 }