Ejemplo n.º 1
0
        public static IList <LopInfo> LayDsLop(String namHoc)
        {
            LopData   m_LData = new LopData();
            DataTable m_DT    = m_LData.LayDsLopForReport(namHoc);

            IList <LopInfo> dS = new List <LopInfo>();

            foreach (DataRow Row in m_DT.Rows)
            {
                LopInfo lop = new LopInfo();

                GiaoVienInfo gv = new GiaoVienInfo();
                gv.MaGiaoVien  = Convert.ToString(Row["MaGiaoVien"]);
                gv.TenGiaoVien = Convert.ToString(Row["TenGiaoVien"]);

                KhoiLopInfo kl = new KhoiLopInfo();
                kl.MaKhoiLop  = Convert.ToString(Row["MaKhoiLop"]);
                kl.TenKhoiLop = Convert.ToString(Row["TenKhoiLop"]);

                NamHocInfo nh = new NamHocInfo();
                nh.MaNamHoc  = Convert.ToString(Row["MaNamHoc"]);
                nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

                lop.MaLop    = Convert.ToString(Row["MaLop"]);
                lop.TenLop   = Convert.ToString(Row["TenLop"]);
                lop.KhoiLop  = kl;
                lop.NamHoc   = nh;
                lop.SiSo     = Convert.ToInt32(Row["SiSo"]);
                lop.GiaoVien = gv;

                dS.Add(lop);
            }
            return(dS);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="lvDS"></param>
        /// <param name="lopInfo"></param>
        public void HienThiDS(ListView lvDS, LopInfo lopInfo)
        {
            if (this.Data == null)
            {
                this.Data = new LopMonHocData();
            }
            DataTable table = this.Data.LayDS(lopInfo, false);

            lvDS.Items.Clear();
            foreach (DataRow row in table.Rows)
            {
                LopMonHocInfo info = new LopMonHocInfo();
                info.MaLopMonHoc = int.Parse(row["MaLopMonHoc"].ToString());
                LopController lopCtrl = new LopController();
                info.Lop = lopCtrl.LayTuMa(row["MaLop"].ToString());
                MonHocController monHocCtrl = new MonHocController();
                info.MonHoc = monHocCtrl.LayTuMa(row["MaMonHoc"].ToString());

                ListViewItem item = new ListViewItem();
                item.Text = info.MonHoc.TenMonHoc;
                item.SubItems.Add(info.Lop.TenLop);

                object[] tag = new object[2];
                tag[0] = info;
                tag[1] = row;

                item.Tag = tag;
                lvDS.Items.Add(item);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="lvDS"></param>
        public void HienThiDS(ListView lvDS, LopInfo lopInfo)
        {
            if (this.Data == null)
            {
                this.Data = new MonHocData();
            }
            DataTable table = this.Data.LayDS(lopInfo);

            lvDS.Items.Clear();
            foreach (DataRow row in table.Rows)
            {
                MonHocInfo info = new MonHocInfo();
                info.MaMonHoc  = row["MaMonHoc"].ToString();
                info.TenMonHoc = row["TenMonHoc"].ToString();
                info.SoTiet    = int.Parse(row["SoTiet"].ToString());
                info.HeSo      = int.Parse(row["HeSo"].ToString());

                ListViewItem item = new ListViewItem();
                item.Text = info.TenMonHoc;
                item.SubItems.Add(info.MaMonHoc);
                item.SubItems.Add(info.SoTiet.ToString());
                item.SubItems.Add(info.HeSo.ToString());

                object[] tag = new object[2];
                tag[0] = info;
                tag[1] = row;

                item.Tag = tag;
                lvDS.Items.Add(item);
            }
        }
Ejemplo n.º 4
0
        public static IList<LopInfo> LayDsLop(String namHoc)
        {
            LopData m_LData = new LopData();
            DataTable m_DT = m_LData.LayDsLopForReport(namHoc);

            IList<LopInfo> dS = new List<LopInfo>();

            foreach (DataRow Row in m_DT.Rows)
            {
                LopInfo lop = new LopInfo();

                GiaoVienInfo gv = new GiaoVienInfo();
                gv.MaGiaoVien = Convert.ToString(Row["MaGiaoVien"]);
                gv.TenGiaoVien = Convert.ToString(Row["TenGiaoVien"]);

                KhoiLopInfo kl = new KhoiLopInfo();
                kl.MaKhoiLop = Convert.ToString(Row["MaKhoiLop"]);
                kl.TenKhoiLop = Convert.ToString(Row["TenKhoiLop"]);

                NamHocInfo nh = new NamHocInfo();
                nh.MaNamHoc = Convert.ToString(Row["MaNamHoc"]);
                nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

                lop.MaLop = Convert.ToString(Row["MaLop"]);
                lop.TenLop = Convert.ToString(Row["TenLop"]);
                lop.KhoiLop = kl;
                lop.NamHoc = nh;
                lop.SiSo = Convert.ToInt32(Row["SiSo"]);
                lop.GiaoVien = gv;

                dS.Add(lop);
            }
            return dS;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbChon_Click(object sender, EventArgs e)
        {
            this.Info = new LopInfo();
            String maLop = ((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString();

            this.Info         = this.LopController.LayTuMa(maLop);
            this.DialogResult = DialogResult.OK;
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbLop_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.cmbLop.SelectedIndex != -1)
     {
         LopInfo lopInfo = new LopInfo();
         lopInfo.MaLop = ((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString();
         this.PhanCongController.Data.LayDS(lopInfo);
     }
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="cmb"></param>
 /// <param name="lopInfo"></param>
 /// <param name="giaoVien"></param>
 public void HienThiComboBox(ComboBox cmb, LopInfo lopInfo, GiaoVienInfo giaoVien)
 {
     if (this.Data == null)
     {
         this.Data = new LopMonHocData();
     }
     cmb.DataSource    = this.Data.LayDS(lopInfo, giaoVien, true);
     cmb.ValueMember   = "MaLopMonHoc";
     cmb.DisplayMember = "TenMonHoc";
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbLop_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.cmbLop.SelectedIndex != -1)
     {
         LopController lopCtrl = new LopController();
         LopInfo       lopInfo = lopCtrl.LayTuMa(((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString());
         this.MonHocController.HienThiDS(this.lvDMMonHoc, lopInfo);
         this.LopMonHocController.HienThiDS(this.lvDSMonHocDuocChon, lopInfo);
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="cmb"></param>
 /// <param name="lopInfo"></param>
 public void HienThiCombobox(ComboBox cmb, LopInfo lopInfo)
 {
     if (this.Data == null)
     {
         this.Data = new MonHocData();
     }
     cmb.DataSource    = this.Data.LayDS(lopInfo);
     cmb.DisplayMember = "TenMonHoc";
     cmb.ValueMember   = "MaMonHoc";
 }
Ejemplo n.º 10
0
 public DiemInfo()
 {
     m_HocSinh = new HocSinhInfo();
        m_MonHoc = new MonHocInfo();
        m_HocKy = new HocKyInfo();
        m_NamHoc = new NamHocInfo();
        m_Lop = new LopInfo();
        m_LoaiDiem = new LoaiDiemInfo();
        m_Diem = 0;
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="dgvDS"></param>
        /// <param name="bnDS"></param>
        /// <param name="maLop"></param>
        public void HienThiDS(DataGridView dgvDS, BindingNavigator bnDS, LopInfo lopInfo)
        {
            if (this.Data == null)
            {
                this.Data = new LopMonHocData();
            }
            BindingSource bs = new BindingSource();

            bs.DataSource      = this.Data.LayDS(lopInfo, false);
            bnDS.BindingSource = bs;
            dgvDS.DataSource   = bs;
        }
Ejemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DataTable LayDS(LopInfo lopInfo)
        {
            if (this.DataService == null)
            {
                this.DataService = new DataService();
            }
            SqlCommand cmd = new SqlCommand("SELECT * FROM MON_HOC WHERE MaMonHoc NOT IN (SELECT MaMonHoc FROM LOP_MONHOC WHERE MaLop=@maLop)");

            cmd.Parameters.Add("maLop", SqlDbType.VarChar).Value = lopInfo.MaLop;
            this.DataService.Load(cmd);
            return(this.DataService);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void botBoQua_Click(object sender, EventArgs e)
        {
            this.cmbNamHoc.Enabled  = true;
            this.cmbKhoiLop.Enabled = true;
            this.cmbLop.Enabled     = true;

            LopController lopCtrl = new LopController();
            LopInfo       lopInfo = lopCtrl.LayTuMa(((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString());

            this.MonHocController.HienThiDS(this.lvDMMonHoc, lopInfo);
            this.LopMonHocController.HienThiDS(this.lvDSMonHocDuocChon, lopInfo);
        }
Ejemplo n.º 14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbLop_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.cmbLop.SelectedIndex != -1)
     {
         this.PhanLopController.HienThiDS(this.lvDSLopHoc, ((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString());
         LopInfo lop = new LopController().LayTuMa(((DataRowView)this.cmbLop.SelectedItem).Row.ItemArray[0].ToString());
         this.LopMonHocController.HienThiComboBox(this.cmbMonHoc, lop, Utilities.TTNguoiDungDangNhap.GiaoVien);
     }
     else
     {
         this.PhanLopController.HienThiDS(this.lvDSLopHoc, "");
         LopInfo lop = new LopInfo();
         this.LopMonHocController.HienThiComboBox(this.cmbMonHoc, lop, Utilities.TTNguoiDungDangNhap.GiaoVien);
     }
 }
Ejemplo n.º 15
0
        public static IList <KQCaNamTongHopInfo> LayDsKQCaNamTongHop(String maLop, String maNamHoc)
        {
            KQCaNamTongHopData m_KQCNTHData = new KQCaNamTongHopData();
            DataTable          m_DT         = m_KQCNTHData.LayDsKQCaNamTongHopForReport(maLop, maNamHoc);

            IList <KQCaNamTongHopInfo> dS = new List <KQCaNamTongHopInfo>();

            foreach (DataRow Row in m_DT.Rows)
            {
                KQCaNamTongHopInfo ketqua = new KQCaNamTongHopInfo();

                HocSinhInfo hs = new HocSinhInfo();
                hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
                hs.HoTen     = Convert.ToString(Row["HoTen"]);
                hs.GioiTinh  = Convert.ToBoolean(Row["GioiTinh"]);
                hs.NgaySinh  = Convert.ToDateTime(Row["NgaySinh"]);
                LopInfo l = new LopInfo();
                l.MaLop  = Convert.ToString(Row["MaLop"]);
                l.TenLop = Convert.ToString(Row["TenLop"]);

                NamHocInfo nh = new NamHocInfo();
                nh.MaNamHoc  = Convert.ToString(Row["MaNamHoc"]);
                nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

                HocLucInfo hl = new HocLucInfo();
                hl.MaHocLuc  = Convert.ToString(Row["MaHocLuc"]);
                hl.TenHocLuc = Convert.ToString(Row["TenHocLuc"]);

                HanhKiemInfo hkiem = new HanhKiemInfo();
                hkiem.MaHanhKiem  = Convert.ToString(Row["MaHanhKiem"]);
                hkiem.TenHanhKiem = Convert.ToString(Row["TenHanhKiem"]);

                KetQuaInfo kq = new KetQuaInfo();
                kq.MaKetQua  = Convert.ToString(Row["MaKetQua"]);
                kq.TenKetQua = Convert.ToString(Row["TenKetQua"]);

                ketqua.HocSinh  = hs;
                ketqua.Lop      = l;
                ketqua.NamHoc   = nh;
                ketqua.HocLuc   = hl;
                ketqua.HanhKiem = hkiem;
                ketqua.KetQua   = kq;
                ketqua.DTBCaNam = Convert.ToSingle(Row["DTBCaNam"]);

                dS.Add(ketqua);
            }
            return(dS);
        }
Ejemplo n.º 16
0
        public static IList<KQHKTongHopInfo> LayDsKQHocKyTongHop(String maLop, String maHocKy, String maNamHoc)
        {
            KQHKTongHopData m_KQHKTHData = new KQHKTongHopData();
              DataTable m_DT = m_KQHKTHData.LayDsKQHocKyTongHopForReport(maLop, maHocKy, maNamHoc);

              IList<KQHKTongHopInfo> dS = new List<KQHKTongHopInfo>();

              foreach (DataRow Row in m_DT.Rows)
              {
              KQHKTongHopInfo ketqua = new KQHKTongHopInfo();

              HocSinhInfo hs = new HocSinhInfo();
              hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
              hs.HoTen = Convert.ToString(Row["HoTen"]);

              LopInfo l = new LopInfo();
              l.MaLop = Convert.ToString(Row["MaLop"]);
              l.TenLop = Convert.ToString(Row["TenLop"]);

              HocKyInfo hk = new HocKyInfo();
              hk.MaHocKy = Convert.ToString(Row["MaHocKy"]);
              hk.TenHocKy = Convert.ToString(Row["TenHocKy"]);

              NamHocInfo nh = new NamHocInfo();
              nh.MaNamHoc = Convert.ToString(Row["MaNamHoc"]);
              nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

              HocLucInfo hl = new HocLucInfo();
              hl.MaHocLuc = Convert.ToString(Row["MaHocLuc"]);
              hl.TenHocLuc = Convert.ToString(Row["TenHocLuc"]);

              HanhKiemInfo hkiem = new HanhKiemInfo();
              hkiem.MaHanhKiem = Convert.ToString(Row["MaHanhKiem"]);
              hkiem.TenHanhKiem = Convert.ToString(Row["TenHanhKiem"]);

              ketqua.HocSinh = hs;
              ketqua.Lop = l;
              ketqua.HocKy = hk;
              ketqua.NamHoc = nh;
              ketqua.HocLuc = hl;
              ketqua.HanhKiem = hkiem;
              ketqua.DTBMonHocKy = Convert.ToSingle(Row["DTBMonHocKy"]);
              ketqua.DanhHieuHS = Convert.ToString(Row["DanhHieuHS"]);

              dS.Add(ketqua);
              }
              return dS;
        }
Ejemplo n.º 17
0
        public static IList<KQCNTongHopInfo> LayDsKQCaNamTongHop(String maLop, String maNamHoc)
        {
            KQCNTongHopData m_KQCNTHData = new KQCNTongHopData();
               DataTable m_DT = m_KQCNTHData.LayDsKQCaNamTongHopForReport(maLop, maNamHoc);

               IList<KQCNTongHopInfo> dS = new List<KQCNTongHopInfo>();

               foreach (DataRow Row in m_DT.Rows)
               {
               KQCNTongHopInfo ketqua = new KQCNTongHopInfo();

               HocSinhInfo hs = new HocSinhInfo();
               hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
               hs.HoTen = Convert.ToString(Row["HoTen"]);

               LopInfo l = new LopInfo();
               l.MaLop = Convert.ToString(Row["MaLop"]);
               l.TenLop = Convert.ToString(Row["TenLop"]);

               NamHocInfo nh = new NamHocInfo();
               nh.MaNamHoc = Convert.ToString(Row["MaNamHoc"]);
               nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

               HocLucInfo hl = new HocLucInfo();
               hl.MaHocLuc = Convert.ToString(Row["MaHocLuc"]);
               hl.TenHocLuc = Convert.ToString(Row["TenHocLuc"]);

               HanhKiemInfo hkiem = new HanhKiemInfo();
               hkiem.MaHanhKiem = Convert.ToString(Row["MaHanhKiem"]);
               hkiem.TenHanhKiem = Convert.ToString(Row["TenHanhKiem"]);

               KetQuaInfo kq = new KetQuaInfo();
               kq.MaKetQua = Convert.ToString(Row["MaKetQua"]);
               kq.TenKetQua = Convert.ToString(Row["TenKetQua"]);

               ketqua.HocSinh = hs;
               ketqua.Lop = l;
               ketqua.NamHoc = nh;
               ketqua.HocLuc = hl;
               ketqua.HanhKiem = hkiem;
               ketqua.KetQua = kq;
               ketqua.DTBCaNam = Convert.ToSingle(Row["DTBCaNam"]);

               dS.Add(ketqua);
               }
               return dS;
        }
        public static IList <KQHocKyTongHopInfo> LayDsKQHocKyTongHop(String maLop, String maHocKy, String maNamHoc)
        {
            KQHocKyTongHopData m_KQHKTHData = new KQHocKyTongHopData();
            DataTable          m_DT         = m_KQHKTHData.LayDsKQHocKyTongHopForReport(maLop, maHocKy, maNamHoc);

            IList <KQHocKyTongHopInfo> dS = new List <KQHocKyTongHopInfo>();

            foreach (DataRow Row in m_DT.Rows)
            {
                KQHocKyTongHopInfo ketqua = new KQHocKyTongHopInfo();

                HocSinhInfo hs = new HocSinhInfo();
                hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
                hs.HoTen     = Convert.ToString(Row["HoTen"]);

                LopInfo l = new LopInfo();
                l.MaLop  = Convert.ToString(Row["MaLop"]);
                l.TenLop = Convert.ToString(Row["TenLop"]);

                HocKyInfo hk = new HocKyInfo();
                hk.MaHocKy  = Convert.ToString(Row["MaHocKy"]);
                hk.TenHocKy = Convert.ToString(Row["TenHocKy"]);

                NamHocInfo nh = new NamHocInfo();
                nh.MaNamHoc  = Convert.ToString(Row["MaNamHoc"]);
                nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

                HocLucInfo hl = new HocLucInfo();
                hl.MaHocLuc  = Convert.ToString(Row["MaHocLuc"]);
                hl.TenHocLuc = Convert.ToString(Row["TenHocLuc"]);

                HanhKiemInfo hkiem = new HanhKiemInfo();
                hkiem.MaHanhKiem  = Convert.ToString(Row["MaHanhKiem"]);
                hkiem.TenHanhKiem = Convert.ToString(Row["TenHanhKiem"]);

                ketqua.HocSinh     = hs;
                ketqua.Lop         = l;
                ketqua.HocKy       = hk;
                ketqua.NamHoc      = nh;
                ketqua.HocLuc      = hl;
                ketqua.HanhKiem    = hkiem;
                ketqua.DTBMonHocKy = Convert.ToSingle(Row["DTBMonHocKy"]);

                dS.Add(ketqua);
            }
            return(dS);
        }
Ejemplo n.º 19
0
        public static IList <KQHocKyMonHocInfo> LayDsKQHocKyMonHoc(String maLop, String maMonHoc, String maHocKy, String maNamHoc)
        {
            KQHocKyMonHocData m_KQHKMHData = new KQHocKyMonHocData();
            DataTable         m_DT         = m_KQHKMHData.LayDsKQHocKyMonHocForReport(maLop, maMonHoc, maHocKy, maNamHoc);

            IList <KQHocKyMonHocInfo> dS = new List <KQHocKyMonHocInfo>();

            foreach (DataRow Row in m_DT.Rows)
            {
                KQHocKyMonHocInfo ketqua = new KQHocKyMonHocInfo();

                HocSinhInfo hs = new HocSinhInfo();
                hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
                hs.HoTen     = Convert.ToString(Row["HoTen"]);

                LopInfo l = new LopInfo();
                l.MaLop  = Convert.ToString(Row["MaLop"]);
                l.TenLop = Convert.ToString(Row["TenLop"]);

                MonHocInfo mh = new MonHocInfo();
                mh.MaMonHoc  = Convert.ToString(Row["MaMonHoc"]);
                mh.TenMonHoc = Convert.ToString(Row["TenMonHoc"]);

                HocKyInfo hk = new HocKyInfo();
                hk.MaHocKy  = Convert.ToString(Row["MaHocKy"]);
                hk.TenHocKy = Convert.ToString(Row["TenHocKy"]);

                NamHocInfo nh = new NamHocInfo();
                nh.MaNamHoc  = Convert.ToString(Row["MaNamHoc"]);
                nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

                ketqua.HocSinh     = hs;
                ketqua.Lop         = l;
                ketqua.MonHoc      = mh;
                ketqua.HocKy       = hk;
                ketqua.NamHoc      = nh;
                ketqua.DTBKiemTra  = Convert.ToSingle(Row["DTBKiemTra"]);
                ketqua.DTBMonHocKy = Convert.ToSingle(Row["DTBMonHocKy"]);

                dS.Add(ketqua);
            }
            return(dS);
        }
Ejemplo n.º 20
0
        public static IList<KQHKMonHocInfo> LayDsKQHocKyMonHoc(String maLop, String maMonHoc, String maHocKy, String maNamHoc)
        {
            KQHKMonHocData m_KQHKMHData = new KQHKMonHocData();
               DataTable m_DT = m_KQHKMHData.LayDsKQHocKyMonHocForReport(maLop, maMonHoc, maHocKy, maNamHoc);

               IList<KQHKMonHocInfo> dS = new List<KQHKMonHocInfo>();

               foreach (DataRow Row in m_DT.Rows)
               {
               KQHKMonHocInfo ketqua = new KQHKMonHocInfo();

               HocSinhInfo hs = new HocSinhInfo();
               hs.MaHocSinh = Convert.ToString(Row["MaHocSinh"]);
               hs.HoTen = Convert.ToString(Row["HoTen"]);

               LopInfo l = new LopInfo();
               l.MaLop = Convert.ToString(Row["MaLop"]);
               l.TenLop = Convert.ToString(Row["TenLop"]);

               MonHocInfo mh = new MonHocInfo();
               mh.MaMonHoc = Convert.ToString(Row["MaMonHoc"]);
               mh.TenMonHoc = Convert.ToString(Row["TenMonHoc"]);

               HocKyInfo hk = new HocKyInfo();
               hk.MaHocKy = Convert.ToString(Row["MaHocKy"]);
               hk.TenHocKy = Convert.ToString(Row["TenHocKy"]);

               NamHocInfo nh = new NamHocInfo();
               nh.MaNamHoc = Convert.ToString(Row["MaNamHoc"]);
               nh.TenNamHoc = Convert.ToString(Row["TenNamHoc"]);

               ketqua.HocSinh = hs;
               ketqua.Lop = l;
               ketqua.MonHoc = mh;
               ketqua.HocKy = hk;
               ketqua.NamHoc = nh;
               ketqua.DTBMonHocKy = Convert.ToSingle(Row["DTBMonHocKy"]);

               dS.Add(ketqua);
               }
               return dS;
        }
Ejemplo n.º 21
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="maLop"></param>
        /// <returns></returns>
        public DataTable LayDS(LopInfo lopInfo, bool layTen)
        {
            if (this.DataService == null)
            {
                this.DataService = new DataService();
            }
            SqlCommand cmd;

            if (layTen)
            {
                cmd = new SqlCommand("SELECT * FROM LOP_MONHOC A, MON_HOC B WHERE A.MaMonHoc=B.MaMonHoc AND MaLop=@maLop");
            }
            else
            {
                cmd = new SqlCommand("SELECT * FROM LOP_MONHOC WHERE MaLop=@maLop");
            }
            cmd.Parameters.Add("maLop", SqlDbType.VarChar).Value = lopInfo.MaLop;
            this.DataService.Load(cmd);
            return(this.DataService);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="maLop"></param>
        /// <returns></returns>
        public LopInfo LayTuMa(string maLop)
        {
            if (this.Data == null)
            {
                this.Data = new LopData();
            }
            DataTable table = this.Data.LayTuMa(maLop);

            if (table.Rows.Count > 0)
            {
                LopInfo info = new LopInfo();
                info.MaLop    = table.Rows[0]["MaLop"].ToString();
                info.TenLop   = table.Rows[0]["TenLop"].ToString();
                info.KhoiLop  = new KhoiLopController().LayTuMa(table.Rows[0]["MaKhoiLop"].ToString());
                info.NamHoc   = new NamHocController().LayTuMa(table.Rows[0]["MaNamHoc"].ToString());
                info.SiSo     = int.Parse(table.Rows[0]["SiSo"].ToString());
                info.GiaoVien = new GiaoVienController().LayTuMa(table.Rows[0]["MaGiaoVien"].ToString());
                return(info);
            }
            return(null);
        }