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); } }
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; } }