コード例 #1
0
        // 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));
        }
コード例 #2
0
        // 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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        // GET: LienHe
        public ActionResult Index()
        {
            TempData["msg"] = MessageBox.Show(thongbao);
            ContactDAO contactDAO = new ContactDAO();
            var        contact    = contactDAO.ListAll().SingleOrDefault();

            return(View(contact));
        }
コード例 #5
0
 public JsonResult List()
 {
     return(Json(ContactDAO.ListAll(), JsonRequestBehavior.AllowGet));
 }