private void listView1_SelectedIndexChanged(object sender, EventArgs e) { int index = 0; index = (listView1.SelectedIndices.Count) - 1; if (index < 0) { index = index + listView1.SelectedIndices.Count; } else { string info = listView1.SelectedItems[index].Text; FormUserDetails userDetail = new FormUserDetails(AdminID, info); userDetail.ShowDialog(); Search_btn.Select(); this.Update(); } }
private void listView1_ItemSelectionChanged_1(object sender, ListViewItemSelectionChangedEventArgs e) { int index = 0; index = (listView1.SelectedIndices.Count) - 1; if (index < 0) { index = index + listView1.SelectedIndices.Count; } else { string info = listView1.SelectedItems[index].Text; FormEditBookDetails editSingleBookDetails = new FormEditBookDetails(info); editSingleBookDetails.ShowDialog(); Search_btn.Select(); this.Update(); } }