AngularJS ui.bootstrap.pagination 分页

1、Html





    
    MyPagination
    
    
    
    


    
序号
姓名
电话
邮箱
年龄
国家
城市
                          @*下一个按钮的文本*@            

2、Action

[HttpPost]
public JsonResult GetPageList(int pageIndex, int pageSize, string name)
{
    int pageCount = 1;
    int recordTotal = 0;
    int topRecordTotal = 0;
    List list = new List();
    try
    {
        list = svc.GetAllStudent();
        recordTotal = list.Count();
        pageCount = (int)Math.Ceiling((decimal)recordTotal / pageSize);
        topRecordTotal = (pageIndex - 1 < 0 ? 0 : pageIndex - 1) * pageSize;
        list = list.Skip(topRecordTotal).Take(pageSize).ToList();
    }
    catch (Exception)
    {
        throw;
    }
    return Json(new
    {
        pageIndex = pageIndex,
        pageCount = pageCount,
        recordTotal = recordTotal,
        Data = list,
    }, JsonRequestBehavior.AllowGet);
}
AngularJS ui.bootstrap.pagination 分页_第1张图片

你可能感兴趣的:(AngularJS)