Esempio n. 1
0
        //Xuat kq dang ky hoc phan cua 1 sinh vien?'
        public void XuatKQDKHPTheoMaSinhVien(string masv)
        {
            SinhVien     sv = dssv[masv];
            DSKQDangKyHP ds = kqhp.TimKQDKTheoMaSV(masv);

            Console.WriteLine("Ma sinh vien:" + masv);
            Console.WriteLine("Ho ten:" + sv.hoTen);
            Console.WriteLine("Lop:" + sv.lop);
            Console.WriteLine(ds.Xuat(dshp));
            Console.Write("Tong so tin chi la {0} LT={1} TH={2}", ds.ds.Sum(x => x.hp.soTC), ds.ds.Sum(x => x.hp.lT), ds.ds.Sum(x => x.hp.tH));
        }
Esempio n. 2
0
        public void XuatKQDKHPTheoMaSinhVien2(string masv)
        {
            SinhVien     sv       = dssv[masv];
            DSKQDangKyHP ds       = kqhp.TimKQDKTheoMaSV(masv);
            string       template = "";
            string       line     = "";

            using (StreamReader sr = new StreamReader("template.txt"))
            {
                while ((line = sr.ReadLine()) != null)
                {
                    template += line + "\n";
                }
            }

            template = template.Replace("<MASV>", masv);
            template = template.Replace("<HOTEN>", sv.hoTen);
            template = template.Replace("<LOP>", sv.lop);
            template = template.Replace("<KETQUA>", ds.Xuat(dshp));
            template = template.Replace("<SOTC>", ds.ds.Sum(x => x.hp.soTC).ToString());
            template = template.Replace("<LT>", ds.ds.Sum(x => x.hp.lT).ToString());
            template = template.Replace("<TH>", ds.ds.Sum(x => x.hp.tH).ToString());
            Console.WriteLine(template);
        }
Esempio n. 3
0
 public void Xuat()
 {
     Console.WriteLine(dssv);
     Console.WriteLine(dshp);
     Console.WriteLine(kqhp.Xuat(dshp));
 }