Exemplo n.º 1
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);
        }
        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);
        }