void XL_Chon()
        {
            if (flag == true)
            {
                DiemBUS adapterDiem = new DiemBUS();
                MonHocBUS adapterMH = new MonHocBUS();
                if (combHocKi.Text != "" && combHocKi.SelectedIndex >= 0)
                {
                    int chi_soHK = combHocKi.SelectedIndex;
                    HocKi KQHK;
                    if (chi_soHK >= 0 )
                    {
                        HocKi[] HK = (HocKi[])combHocKi.Tag;
                        KQHK = HK[chi_soHK];

                        MonHoc []Danh_sach_MH = adapterMH.getAllMH_BUS();
                        HocSinhBUS adater = new HocSinhBUS();
                        HocSinh HS = new HocSinh();
                        HS = adater.getStudentIf_BUS2(BienToanCuc.CurrentUser.MaTaiKhoan);
                        diem = adapterDiem.getMarkIf_BUS(HS.MaHocSinh,KQHK.MaHocKi);

                        DataTable dt = new DataTable();

                        dt.Columns.Add("tenMonHoc");
                        dt.Columns.Add("diem15Phut");
                        dt.Columns.Add("diem1Tiet");
                        dt.Columns.Add("diemHocKi");

                        for (int i = 0; i < Danh_sach_MH.Length; i++)
                        {
                            DataRow Dong = dt.NewRow();
                            dt.Rows.Add(Dong);
                            Dong["tenMonHoc"] = Danh_sach_MH[i].TenMonHoc;
                            Dong["diem15Phut"] = diem[i].Diem15Phut;
                            Dong["diem1Tiet"] = diem[i].Diem1Tiet;
                            Dong["diemHocKi"] = diem[i].DiemHocKi;
                        }
                        dgvBangDiem.DataSource = dt;
                    }

                }
            }
        }
 private void frmBaoCaoTongKetMon_Load(object sender, EventArgs e)
 {
     HocKiBUS adapterHK = new HocKiBUS();
     MonHocBUS adapterMH = new MonHocBUS();
     if (flag == false)
     {
         combMonHoc.DataSource = adapterMH.getAllMH_BUS();
         combMonHoc.DisplayMember = "tenMonHoc";
         combMonHoc.Tag = adapterMH.getAllMH_BUS();
         combHocKi.DataSource = adapterHK.getAllHK_BUS();
         combHocKi.DisplayMember = "tenHocKi";
         combHocKi.Tag = adapterHK.getAllHK_BUS();
         flag = true;
     }
     capNhat();
 }
        private void frmThayDoiBangDiem_Load(object sender, EventArgs e)
        {
            LopBUS adaterLop = new LopBUS();
            HocKiBUS adapterHK = new HocKiBUS();
            MonHocBUS adapterMH = new MonHocBUS();

            if (flag == false)
            {
                combMonHoc.DataSource = adapterMH.getAllMH_BUS();
                combMonHoc.DisplayMember = "tenMonHoc";
                combMonHoc.Tag = adapterMH.getAllMH_BUS();

                combHK.DataSource = adapterHK.getAllHK_BUS();
                combHK.DisplayMember = "tenHocKi";
                combHK.Tag = adapterHK.getAllHK_BUS();

                combLop.DataSource = adaterLop.getAllClass_BUS();
                combLop.DisplayMember = "tenLop";
                combLop.Tag = adaterLop.getAllClass_BUS();
                flag = true;
            }
            XL_Chon();
        }