點擊的頁面跟定義的變量
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);
}
點擊的頁面跟定義的變量