private void listView1_DoubleClick(object sender, EventArgs e) { ListViewItem selectedItem = listView1.SelectedItems[0]; UpdateProductForm window = new UpdateProductForm(selectedItem); window.ShowDialog(); updateListView1(); }
private void updateProductButton_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { ListViewItem selectedItem = listView1.SelectedItems[0]; UpdateProductForm window = new UpdateProductForm(selectedItem); window.ShowDialog(); updateListView1(); } }