public PartialViewResult PublisherPartial() { var publisherDAO = new PublisherDAO(); var publishers = publisherDAO.Gets("", 0, 0); return(PartialView(publishers)); }
public PartialViewResult _NavbarPublisherPartial() { var publisherDAO = new PublisherDAO(); var categories = publisherDAO.Gets("", 0, 0); return(PartialView(categories)); }
public JsonResult Gets(string key = "", int page = 1, int pageSize = 5) { try { List <Publisher> data = dao.Gets(key, page, pageSize); int totalRow = dao.Count(key); return(Json(new { data = data, totalRow = totalRow }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { data = DBNull.Value.ToString() }, JsonRequestBehavior.AllowGet)); } }