public ActionResult GetRols(RquestPagingData requsetview) { ResponsPagingData responseData = new ResponsPagingData(); int count=0; //查询所有角色信息 var roles = rolebll.QueryByPaging(requsetview.start, requsetview.length, c => true, c => c.Rid, ref count).ToList<Roles>().Select(c =>new{Rid=c.Rid,RName=c.RName }); responseData.data = roles; responseData.draw = requsetview.draw; responseData.recordsFiltered = count; responseData.recordsTotal = count; return Json(responseData); }
public ActionResult GetUsers(RquestPagingData requsetview) { ResponsPagingData responseData = new ResponsPagingData(); int count = 0; //查询所有角色信息 var users = userbll.QueryByPaging(requsetview.start, requsetview.length, c => c.IsDelete==0, c => c.uid, ref count).ToList<Users>().Select(c => new {c.uid,c.Uname,c.LoginName }); responseData.data = users; responseData.draw = requsetview.draw; responseData.recordsFiltered = count; responseData.recordsTotal = count; return Json(responseData); }