// GET: Admin/OrderDetail public ActionResult Index() { OrderBLL bll = new OrderBLL(); OrderModel model = new OrderModel(); model.list = bll.GetList(1, ""); model.currentPage = 1; model.totalPage = bll.CountPage(""); return(View(model)); }
public ActionResult Index(OrderModel model) { OrderBLL bll = new OrderBLL(); if (model.searchWord == null) { model.searchWord = ""; } if (model.currentPage == 0) { model.currentPage = 1; } model.list = bll.GetList(model.currentPage, model.searchWord); model.totalPage = bll.CountPage(model.searchWord); return(View(model)); }