Esempio n. 1
0
        public ActionResult Back()
        {
            UserManager bll  = new UserManager();
            DateTime    now  = DateTime.Now;
            DateTime    dt   = Convert.ToDateTime(now.ToShortDateString());
            List <User> info = bll.GetAll();

            ViewBag.Use = info.Count();
            List <User> info1 = bll.Where(x => x.User_Condition == "在职");

            ViewBag.Use1 = info1.Count();
            List <User> info2 = bll.Where(x => x.User_Condition == "离职");

            ViewBag.Use2 = info2.Count();
            ClassManager  blll = new ClassManager();
            List <_class> cla  = blll.Where(x => x.DataTime == dt);

            ViewBag.Use3 = cla;
            ActionManager a      = new ActionManager();
            List <action> detail = a.GetAll();
            var           list   = detail.OrderByDescending(x => x.actiontime).Take(5).ToList();

            ViewBag.Use5 = list;
            WebManager web     = new WebManager();
            List <web> detail1 = web.GetAll();
            var        list1   = detail1.OrderByDescending(x => x.like).Take(5).ToList();

            ViewBag.Use4 = list1;
            return(View());
        }
Esempio n. 2
0
        // GET: TangKai/Homes
        public ActionResult Index()
        {
            ClassManager  blll  = new ClassManager();
            List <_class> cla   = blll.GetAll();
            var           list2 = cla.OrderByDescending(x => x.DataTime).Take(5).ToList();

            ViewBag.Use1 = list2;
            ActionManager a      = new ActionManager();
            List <action> detail = a.GetAll();
            var           list   = detail.OrderByDescending(x => x.actiontime).Take(5).ToList();

            ViewBag.Use2 = list;
            WebManager web     = new WebManager();
            List <web> detail1 = web.GetAll();
            var        list1   = detail1.OrderByDescending(x => x.like).Take(5).ToList();

            ViewBag.Use3 = list1;
            return(View());
        }