// GET: Admin/Discount public ActionResult Index() { var dll = new DiscountCodeBLL(); var model = new DiscountModel(); model.currentPage = 1; model.totalPage = dll.CountPage(""); model.list = dll.GetList(1, ""); return(View(model)); }
public ActionResult Index(DiscountModel model) { if (model.searchWord == null) { model.searchWord = ""; } if (model.currentPage == 0) { model.currentPage = 1; } var dll = new DiscountCodeBLL(); model.totalPage = dll.CountPage(model.searchWord); model.list = dll.GetList(model.currentPage, model.searchWord); return(View(model)); }