示例#1
0
        public ActionResult GetData(string idCategory, string currentIndex)
        {
            var contentDao     = new ContentDao();
            var list           = contentDao.GetListByCategoryID(Int64.Parse(idCategory), Int32.Parse(currentIndex), 3);
            var checkNext      = contentDao.IsHaveNextPage(Int64.Parse(idCategory), Int32.Parse(currentIndex) + 1, 3);
            var jsonSerialiser = new JavaScriptSerializer();
            var json           = jsonSerialiser.Serialize(list);

            return(Json(new { success = true, data = json, checkNext = checkNext, nextPage = Int32.Parse(currentIndex) + 1 }, JsonRequestBehavior.AllowGet));
        }