예제 #1
0
        public JsonResult GetUsers(int page, int rows, string searchValue = "")
        {
            var users = new UserSv().GetUsers(searchValue);
            int total = users.Count();

            users = users.Skip((page - 1) * rows).Take(rows).ToList();
            return(Json(new { rows = users, total = total }));
        }
예제 #2
0
        public JsonResult GetUsers(int page, int rows, string searchValue = "")
        {
            var users  = new UserSv().GetUsers(searchValue);
            var total  = users.Count();
            var result = users.Skip((page - 1) * rows).Take(rows)
                         .Select(u => new
            {
                u.comment,
                u.continual_error_times,
                u.email,
                u.forbit_date,
                u.forbit_reason,
                u.in_date,
                u.is_forbit,
                u.last_login_date,
                u.real_name,
                u.user_id,
                u.user_name,
                u.user_role
            })
                         .ToList();

            return(Json(new { rows = result, total = total }));
        }