Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.AppendHeader("Access-Control-Allow-Origin", "*");
            context.Response.AppendHeader("Content-type", "application/json");
            BLL.LvYouJingDianXinXi model = new BLL.LvYouJingDianXinXi();
            var    list    = model.GetModelList("");
            string jsonstr = new JavaScriptSerializer().Serialize(list);

            context.Response.Write(jsonstr);
        }
Пример #2
0
        public void ProcessRequest(HttpContext context)
        {
            BLL.LvYouJingDianXinXi mainService = new BLL.LvYouJingDianXinXi();
            list = mainService.GetModelList("");
            int    count    = list.Count();
            var    jsonstr1 = new { jingdianList = list, jingdianCount = count };
            string jsonstr  = new JavaScriptSerializer().Serialize(jsonstr1);

            context.Response.Write(jsonstr);
        }