示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }