示例#1
0
        private void buttonViewProducts_Click(object sender, EventArgs e)
        {
            try
            {
                ProductDBManager pdbm = new ProductDBManager();

                dataGridViewProducts.DataSource = pdbm.RetrieveProducts(idUser);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#2
0
        private void buttonDeleteProduct_Click(object sender, EventArgs e)
        {
            try
            {
                Product product = RetriveProductInformation();

                ProductDBManager pdbm = new ProductDBManager();
                pdbm.DeleteProduct(product, idUser);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                throw;
            }
        }