标签:ota The url obj ali alc lse 三方 mode
@using PagedList.Mvc;
@model PagedList.IPagedList<ShenPiMvc.Models.JiaViewModel>
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页 @Html.PagedListPager(Model,pageIndex=>Url.Action("ShowJt",new { pageIndex }), new PagedListRenderOptions { LinkToFirstPageFormat="首页", LinkToNextPageFormat="下一页", LinkToPreviousPageFormat="上一页", LinkToLastPageFormat="末页", MaximumPageNumbersToDisplay=0, DisplayItemSliceAndTotal=false } )
//显示假条 --组员 public ActionResult ShowJt(int pageIndex=1) { ViewBag.uname = Session["uname"]; string result = HttpClientHelper.Send("get", "api/jia", null); List<JiaViewModel> jias = JsonConvert.DeserializeObject<List<JiaViewModel>>(result); //每页显示5条 pageIndex为当页索引 int pageSize = 4; //总记录数 int toTalCount = jias.Count; //总记录数 IPagedList<JiaViewModel> pagedList = jias.ToPagedList(pageIndex, pageSize); return View(pagedList); }
标签:ota The url obj ali alc lse 三方 mode
原文地址:https://www.cnblogs.com/xuan666/p/10777573.html