Пример #1
0
 public async Task <JsonResult> GetList(ExpenseDetailPara para)
 {
     para.PageNumber = para.PageNumber - 1;
     para.UserId     = LoginInfo.Id;
     return(await Task.Run(() =>
     {
         var dtos = _expenseDetailService.GetList(para, out var count);
         var list = dtos.MapTo <List <ExpenseDetailModel> >();
         return Json(new { rows = list, total = count });
     }));
 }
Пример #2
0
 public async Task <JsonResult> GetList(ExpenseDetailPara para, int page = 0, int rows = 20)
 {
     return(await Task.Run(() =>
     {
         para.PageNumber = page - 1; //当前页
         para.PageSize = rows;       //每页显示条数
         para.OrgId = LoginInfo.Org.Id;
         para.RoleId = LoginInfo.Role;
         var rlt = _expenseDetailService.GetList(para, out var count);
         var data = rlt.MapTo <List <ExpenseDetailModel> >();
         return new JsonResult(new { total = count, rows = data });
     }));
 }