// GET: Home public ActionResult Index(int page = 1, int pageSize = 10) { var dao = new ContentDao(); var model = dao.ListAllPaging(page, pageSize); return(View(model)); }
// GET: Admin/Content public ActionResult Index(int page = 1, int pagesize = 10) { var dao = new ContentDao(); var result = dao.ListAllPaging(page, pagesize); return(View(result)); }
public ActionResult Index(string searchString = "", int page = 1, int pageSize = 10) { var dao = new ContentDao(); var model = dao.ListAllPaging(searchString, page, pageSize); ViewBag.SearchString = searchString; return(View(model)); }
// GET: Admin/Content public ActionResult Index(string searchString = null, int page = 1, int pageSize = 2) { var dao = new ContentDao(); var list = dao.ListAllPaging(searchString, page, pageSize); ViewBag.searchString = searchString; return(View(list)); }
// GET: Content public ActionResult Index(int?page, long Id = 0) { ContentFilter filter = new ContentFilter(); filter.CategoryID = Id; var model = contentDao.ListAllPaging(filter, page ?? 1, 20); return(View(model)); }
public object Index(string searchString, int page = 1, int pageSize = 10) { var dao = new ContentDao(); var model = dao.ListAllPaging(searchString); var result = model.ToPagedList(page, pageSize); ViewBag.SearchString = searchString; ViewBag.OnePageOfProduct = result; return(View()); }
// GET: Admin/Content public ActionResult Index(int page = 1, int pageSize = 10, string name = "", string description = "") { SetViewBag(); var dao = new ContentDao(); var model = dao.ListAllPaging(page, pageSize, name, description); ViewBag.name = name; ViewBag.description = description; return(View(model)); }
public ActionResult Index(int page = 1, int pageSize = 10) { ContentFilter filter = (ContentFilter)Session["ContentFilter"]; if (filter == null) { filter = new ContentFilter(); Session["ContentFilter"] = filter; } filter.CatalogueId = SiteConfiguration.CatalogueId; var model = dao.ListAllPaging(filter, page, pageSize); return(View(model)); }
public ActionResult Edit(Content content) { SetViewBag(); var dao = new ContentDao(); var model = dao.ListAllPaging(1, 10); if (ModelState.IsValid) { var result = dao.update(content); if (result) { return(RedirectToAction("Index", "Content", model)); } else { ModelState.AddModelError("", "Cập nhật không thành công"); SetAlert("Cập nhật không thành công", "error"); } } return(View("Edit")); }