public ActionResult DanhGia(SinhVien SV) { int a = int.Parse(Session["NamHoc"].ToString()); int b = int.Parse(Session["HocKy"].ToString()); var d = new DiemRenLuyenLopDao(); int c = (int)SV.MaSV / 1000000000; if (c > 0 && c < 10) { d.create(SV.MaSV, a, b); } var diem = new DiemRenLuyenDao(); if (d.GetByRL(SV.MaSV, a, b) == null) { d.create(SV.MaSV, a, b); } if (diem.GetByRL(SV.MaSV, a, b) == null) { diem.create(SV.MaSV, a, b); } ViewBag.DiemSV = diem.GetByRL(SV.MaSV, a, b); ViewBag.DiemSV_Lop = d.GetByRL(SV.MaSV, a, b); ViewBag.DiemTong = diem.DiemTong(SV.MaSV, a, b); ViewBag.DiemTong_Lop = d.DiemTong(SV.MaSV, a, b); return(View(SV)); }
public ActionResult DanhGia() { string NamHoc = Session["NamHoc"].ToString(); string HocKy = Session["HocKy"].ToString(); ViewBag.DD = 1; string a = Session["MASV"].ToString(); ViewBag.SV = new SinhVienDao().GetSV(Double.Parse(a)); var DiemSV = new DiemRenLuyenDao(); if (DiemSV.GetByRL(Double.Parse(a), int.Parse(NamHoc), int.Parse(HocKy)) == null) { DiemSV.create(Double.Parse(a), int.Parse(NamHoc), int.Parse(HocKy)); } ViewBag.DiemSV = DiemSV.GetByRL(Double.Parse(a), int.Parse(NamHoc), int.Parse(HocKy)); return(View()); }