예제 #1
0
        public AjaxResult JobOffersListLoad(JobOffersListReq req)
        {
            var q = from t in db.JobOffers where t.IsActive == 1 select t;

            //过滤条件
            if (!string.IsNullOrWhiteSpace(req.Name))
            {
                q = q.Where(w => w.Name.Contains(req.Name));
            }
            //
            var dataList   = q.OrderByDescending(m => m.Id).Skip((req.PageIndex - 1) * req.PageSize).Take(req.PageSize).ToList();
            var TotalCount = q.Count();
            var page       = new
            {
                TotalCount = TotalCount,
                dataList   = dataList,
            };

            return(new AjaxResult(page));
        }
예제 #2
0
        public ActionResult JobOffersListLoad(JobOffersListReq req)
        {
            var r = _JobOffersManager.JobOffersListLoad(req);

            return(Json(r));
        }