首页 > 其他 > 详细

控制器

时间:2018-07-30 10:31:42      阅读:102      评论:0      收藏:0      [点我收藏+]

Stubll bll = new Stubll();
public static int pages;
public static string TableName = "Stu";
public static string IndexCol = "ID";
public static int PageSize = 3;
public static int PageIndex = 0;
public static string OrderCol = "ID desc";
public static string Where = "";
public static string Columns = "*";

public ActionResult Index()
{
ProcPrams p = new ProcPrams
{
TableName = TableName,
IndexCol = IndexCol,
PageSize = PageSize,
PageIndex = PageIndex,
OrderCol = OrderCol,
Where = Where,
Columns = Columns
};

PagesOut<Stu> li = bll.GetDataList(p);
List<Stu> lis = li.list;

int count = li.SumCount; //总行数
pages = (count % PageSize > 0) ? count / PageSize + 1 : count / PageSize;
return View(lis);
}

控制器

原文:https://www.cnblogs.com/xiaoandong/p/9388654.html

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