Ejemplo n.º 1
0
        public ActionResult Index()
        {
            if (!user.IsAdmin())
            {
                return(View("Error"));
            }
            Model.UpdateLastLogin();
            Model.UpdateLastSeen("Trang Chủ", Url.Action("Index"));
            Dictionary <string, int> ListCount = Model.GetDashBoard();

            return(View(ListCount));
        }
Ejemplo n.º 2
0
        AdminDA Model = new AdminDA();                                                  // Tạo biến lưu Admin

        public ActionResult Index()
        {
            if (!user.IsAdmin())
            {
                return(View("Error"));                                                   // Nếu không sẽ báo lỗi
            }
            // Nếu đúng
            Model.UpdateLastLogin();
            Model.UpdateLastSeen("Trang Chủ", Url.Action("Index"));
            Dictionary <string, int> ListCount = Model.GetDashBoard();                   // Đếm sô lượng

            return(View(ListCount));                                                     // Trả về giao diện số lượng đếm được
        }