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