// GET: Admin/Contact public ActionResult Index(int page = 1, int pagesize = 2) { ContactDAO contactDAO = new ContactDAO(); var list = contactDAO.ListAll().ToPagedList(page, pagesize); return(View(list)); }
// GET: Admin/TrangLienHe public ActionResult Index(string searchString, int page = 1, int pagesize = 10) { var dao = new ContactDAO(); var listContact = dao.ListAll(searchString, page, pagesize); return(View(listContact)); }
public ActionResult AboutUs(int id = 4) { TempData["msg"] = MessageBox.Show(thongbao); ContactDAO contactDAO = new ContactDAO(); var contact = contactDAO.ListAll().SingleOrDefault(x => x.ContactID == id); return(View(contact)); }
// GET: LienHe public ActionResult Index() { TempData["msg"] = MessageBox.Show(thongbao); ContactDAO contactDAO = new ContactDAO(); var contact = contactDAO.ListAll().SingleOrDefault(); return(View(contact)); }
public JsonResult List() { return(Json(ContactDAO.ListAll(), JsonRequestBehavior.AllowGet)); }