public ActionResult SelectRoom(int id) { 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()); var model = studentDao.GetRoom(id); ViewBag.studenname = studentDao.ViewDetail(id_student).student_name; studentDao.UpdateLastSeen("Chọn phòng thi cho kỳ thi" + model.FirstOrDefault().thread.thread_name, "/Student/Home/SelectRoom" + id, id_student); return(View(model)); }