public ActionResult TestResult(int id) { var session = (StudentLogin)Session[CommonConstants.STUDENT_SESSION]; var id_student = session.id_student; if (studentDao.getTesting(id_student) > 0) { return(View("DoingTest")); } if (studentDao.GetStudentTestcode(id_student).IndexOf(id) == -1) { return(View("Error")); } ViewBag.score = studentDao.GetScore(id_student, id); ViewBag.studenname = studentDao.ViewDetail(id_student).student_name; var model = studentDao.GetListQuest(studentDao.GetIdExam(id_student, id), id_student); studentDao.UpdateLastLogin(id_student, GetIPAddress(), GetUserEnvironment()); studentDao.UpdateLastSeen("Đang xem kết quả của " + model.FirstOrDefault().thread.thread_name, "/Student/Home/TestResult/" + id, id_student); return(View(model)); }