コード例 #1
0
        private void lvDSHSTheoLop_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lvDSHSTheoLop.SelectedItems.Count > 0)
            {
                string maHS = lvDSHSTheoLop.SelectedItems[0].SubItems[1].Text;
                // MessageBox.Show(maHS);
                HocSinh hs = hocSinhbll.GetHocSinh(maHS);

                if (hs != null)
                {
                    tbMaHS_DSLH.Text     = hs.MaHocSinh;
                    tbHoTen_DSLH.Text    = hs.HoVaTen;
                    tbNamSinh_DSLH.Text  = hs.NamSinh;
                    tbGioiTinh_DSLH.Text = hs.GioiTinh;
                    tbmail_DSLH.Text     = hs.Email;
                    tbDiaChi_DSLH.Text   = hs.DiaChi;
                }
            }
        }
コード例 #2
0
        private void lvdshs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lvdshs.SelectedItems.Count > 0)
            {
                DShocsinhBLL hocsinhbll = new DShocsinhBLL();
                string       maHocSinh  = lvdshs.SelectedItems[0].SubItems[1].Text;
                HocSinh      hocsinh    = hocsinhbll.GetHocSinh(maHocSinh);

                tbMaHocSinh.Text = hocsinh.MaHocSinh;
                tbHoVaTen.Text   = hocsinh.HoVaTen;
                tbGioiTinh.Text  = hocsinh.GioiTinh;
                tbDiaChi.Text    = hocsinh.DiaChi;
                tbEmail.Text     = hocsinh.Email;
                tbNgaySinh.Text  = hocsinh.NamSinh;

                QuaTrinhHocTapBLL     quaTrinhHocbll  = new QuaTrinhHocTapBLL();
                List <QuaTrinhHocTap> listQuaTrinhHoc = quaTrinhHocbll.GetQuaTrinhHocTapCoMaHS(hocsinh.MaHocSinh);
                tbLop.Text = listQuaTrinhHoc[0].MaLop;
            }
        }