private void lvCTDT_SelectedIndexChanged(object sender, EventArgs e) { if (lvCTDT.SelectedItems.Count > 0) { ListViewItem lv = lvCTDT.SelectedItems[0]; string maKhoi = lv.SubItems[1].Text; string MaMon = lv.SubItems[2].Text; string heSo = lv.SubItems[3].Text; tbMaKL_CTDT.Text = maKhoi; tbMaMH_CTDT.Text = MaMon; tbHeSoCTDT.Text = heSo; } KhoiLopBLL lopBll = new KhoiLopBLL(); KhoiLop lop = lopBll.GetKhoiLop(tbMaKL_CTDT.Text); tbTenKhoi_CTDT.Text = lop.TenKhoiLop; MonHocBLL mh = new MonHocBLL(); MonHoc mon = mh.GetMonHoc(tbMaMH_CTDT.Text); tbTenMH_CTDT.Text = mon.TenMonHoc; }