private void buttonNew_Click(object sender, EventArgs e) { productForm form = new productForm(this.context); form.ShowDialog(this); loadList(); }
private void editSelection() { try { foreach (ListViewItem item in listView.SelectedItems) { int id = Convert.ToInt16(item.Tag); Product product = new Product(id); productForm form = new productForm(this.context, product); form.ShowDialog(this); loadList(); } } catch (Exception ex) { Tools.ShowError("Unable to load product\n" + ex.Message); } }