标签:col res summary userinfo info list int use 首页
static int index = 1;
static int size = 3;
static int count = 0;//总条数
static int page = 0;//总页数
string Where = "";//条件
static string orderCol = " a.ID asc";//排序
/// <summary>
/// 首页
/// </summary>
/// <returns></returns>
public ActionResult First()
{
XiaoQu();
DongHao();
HuXing();
ZhuangTai();
List<UserInfoModel> list = ShowPage();
return View("Index", list);
}
/// <summary>
/// 上一页
/// </summary>
/// <returns></returns>
public ActionResult ShangYiYe()
{
XiaoQu();
DongHao();
HuXing();
ZhuangTai();
if (index > 1)
{
index--;
}
List<UserInfoModel> list = ShowPage();
return View("Index", list);
}
/// <summary>
///// 下一页
/// </summary>
/// <returns></returns>
public ActionResult Next()
{
XiaoQu();
DongHao();
HuXing();
ZhuangTai();
if (index < page) //当前页小于总页数
{
index++;
}
List<UserInfoModel> list = ShowPage();
return View("Index", list);
}
/// <summary>
/// 尾页
/// </summary>
/// <returns></returns>
public ActionResult WeiYe()
{
XiaoQu();
DongHao();
HuXing();
ZhuangTai();
List<UserInfoModel> list = ShowPage();
return View("Index", list);
}
标签:col res summary userinfo info list int use 首页
原文地址:https://www.cnblogs.com/MenBe/p/9521728.html