// GET: Student/Home public ActionResult Index() { var session = (StudentLogin)Session[CommonConstants.STUDENT_SESSION]; var id_student = session.id_student; if (studentDao.getTesting(id_student) > 0) { return(RedirectToAction("DoingTest")); } studentDao.UpdateLastLogin(id_student, GetIPAddress(), GetUserEnvironment()); studentDao.UpdateLastSeen("Trang chủ", Url.Action("Index"), id_student); ViewBag.score = studentDao.GetStudentTestcode(id_student); ViewBag.studenname = studentDao.ViewDetail(id_student).student_name; return(View(studentDao.GetDashboard())); }