控制器
Posted xiaoandong
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了控制器相关的知识,希望对你有一定的参考价值。
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);
}
以上是关于控制器的主要内容,如果未能解决你的问题,请参考以下文章