private void addNewProductButton_Click(object sender, EventArgs e) { try { ProductManagement.NewProductAddForm newProductAddForm = new ProductManagement.NewProductAddForm(this, false, null); newProductAddForm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void productDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { ProductManagement.NewProductAddForm newProductAddForm = new ProductManagement.NewProductAddForm(this, true, productList[e.RowIndex]); newProductAddForm.Show(); } catch (Exception exc) { MessageBox.Show(exc.Message); } }