예제 #1
0
        //
        // GET: /Admin/Home/

        public ActionResult Index()
        {
            if (!Common.IsLogin)
            {
                return(new HttpUnauthorizedResult());
            }
            using (var db = new RIPPWebEntities())
            {
                var m = new Models.HomeIndexModel();
                m.User        = Common.Get_User;
                m.CountModel  = db.model.Where(d => d.uid == Common.Get_UserID).Count();
                m.CountSpec   = db.spec.Where(d => d.uid == Common.Get_UserID).Count();
                m.CountResult = db.results.Where(d => d.uid == Common.Get_UserID).Count();

                return(View(m));
            }
        }
예제 #2
0
 public ActionResult Index()
 {
     Models.HomeIndexModel model = new Models.HomeIndexModel();
     model.RightNow = DateTime.Now;
     return(View(model));
 }