public ActionResult Index(int pageindex=1)
{
string name = Request.Form["name"];
StringBuilder str = new StringBuilder();
{
string name = Request.Form["name"];
StringBuilder str = new StringBuilder();
if (!string.IsNullOrEmpty(name))
{
str.Append("and ShoppingName like '%" + name + "%'");
}
{
str.Append("and ShoppingName like '%" + name + "%'");
}
int totalNum = 0;
ProductBLL.ProductBLL bll = new ProductBLL.ProductBLL();
ParamModel model = new ParamModel() { StrWhere = str.ToString(), TableName = "Shopping", Columns = "*", IndexCol = "ShoppingId", OrderCol = "ShoppingId asc", PageIndex = pageindex-1, PageSize = 5 };
ProductBLL.ProductBLL bll = new ProductBLL.ProductBLL();
ParamModel model = new ParamModel() { StrWhere = str.ToString(), TableName = "Shopping", Columns = "*", IndexCol = "ShoppingId", OrderCol = "ShoppingId asc", PageIndex = pageindex-1, PageSize = 5 };
PagedList<ProjectModel> pList = PageCommon.GetPagedListData<ProjectModel>(model, out totalNum);
pList.PageSize = model.PageSize;
pList.TotalItemCount = totalNum;
pList.CurrentPageIndex = pageindex;
pList.PageSize = model.PageSize;
pList.TotalItemCount = totalNum;
pList.CurrentPageIndex = pageindex;
return View(pList);
}
}