private void btnEdit_Click(object sender, EventArgs e) { if (lstSupplier.SelectedItems.Count > 0) { ListViewItem selectedItem = lstSupplier.SelectedItems[0]; clsSupplier supplier = (clsSupplier)selectedItem.Tag; frmAddSupplier showForm = new frmAddSupplier(this, supplier); showForm.Show(); } }
private void btnAdd_Click(object sender, EventArgs e) { frmAddSupplier showForm = new frmAddSupplier(this, null); showForm.Show(); }