您现在的位置:首页 >> Asp.NET >> 内容

MVC Json 的返回

时间:2014-11-19 15:28:43 点击:

  核心提示:123456789101112131415161718192021222324252627/// summary/// 获取评论列表/// /summary/// param name='pageIn...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/// <summary>
        /// 获取评论列表
        /// </summary>
        /// <param name="pageIndex">
        /// <returns></returns>
        public ActionResult GetCommentList(int pageIndex=1)
        {
            try{
                WebUser webuser= FunSession.GetSession() as WebUser;
                var pageCount=0;
                var list = HotelOrderInfoService.GetHotelCommentList(webuser.Id, pageIndex, out pageCount);
                return new JsonResult
                {
                    Data = new { mdata = list, pageIndex = pageIndex, pageCount = pageCount, success = true },
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                };
 
            }catch(Exception ex)
            {
                return new JsonResult
                {
                    Data = new { mdata = "", pageIndex = pageIndex, pageCount = 0, success = false },
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                };
            }
            
        }

作者:不详 来源:网络
共有评论 0相关评论
发表我的评论
  • 大名:
  • 内容:
  • 青春网络编程技术(www.qcfupo.com) © 2020 版权所有 All Rights Reserved.
  • Powered by qcfupo! V3.0sp1
  • 百度友情链接: 百家乐[www.chinawestnews.net/aomenbaijiale/] 赌博网[www.chinawestnews.net/amdbwz/] 海立方[www.bjl.gov.cn/bjgylc/] 娱乐城[www.gtxrmzf.gov.cn/mapai/] 娱乐城[www.hfsf.gov.cn/yfgj/] 威尼斯人[www.hllinkou.gov.cn/baijile/] 澳门威尼斯[www.jjwgj.gov.cn/wnsr/] 888真人[www.lagm.gov.cn/888zhenren/] 百乐坊[www.laoling.gov.cn/blfylc/] 现金网[www.longyu.gov.cn/xjw/] 百家乐[www.chinawestnews.net/ambjl/] 新葡京娱乐场[www.sjzedu.gov.cn/jsylc/] 时时彩[www.snjw.gov.cn/ssc/] 赌博[www.chinawestnews.net/aomendubo/]