首页 > 其他 > 详细

点击的页面跟定义的变量

时间:2018-08-23 10:06:19      阅读:156      评论:0      收藏:0      [点我收藏+]

 

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);
}

点击的页面跟定义的变量

原文:https://www.cnblogs.com/MenBe/p/9521728.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!