Esempio n. 1
0
        // GET: Admin/Student
        public ActionResult Index()
        {
            var dao     = new AdminDao();
            var session = (AdminLogin)Session[CommonConstants.USER_SESSION];

            if (session.id_permission != 1)
            {
                return(View("Error"));
            }
            ViewBag.AdminName = session.name;

            dao.UpdateLastLogin(session.id_admin);
            dao.UpdateLastSeen("Quản lý sinh viên", "Admin/Student/", session.id_admin);
            var dao1  = new StudentDao();
            var model = dao1.ListAll();

            return(View(model));
        }