예제 #1
0
        protected override void OnInit(EventArgs e)
        {
            string PostType = Request["PostType"];

            if (string.IsNullOrEmpty(PostType))
            {
                base.OnInit(e);
                return;
            }

            Common.Helper.mJsonResult json = new Common.Helper.mJsonResult();
            switch (PostType)
            {
            case "getWechatImage":
                GetWechatImage();    //从微信服务器上获取图片
                break;

            default: break;
            }
            if (json != null)
            {
                string retStr = json.ToJson();
                Response.Write(retStr);
                Response.End();
            }
        }
예제 #2
0
        protected override void OnInit(EventArgs e)
        {
            string PostType = Request["PostType"];
            if (string.IsNullOrEmpty(PostType))
            {
                base.OnInit(e);
                return;
            }

            Common.Helper.mJsonResult json = new Common.Helper.mJsonResult();
            switch(PostType)
            {
                case "getWechatImage":
                    GetWechatImage();//从微信服务器上获取图片
                    break;
                default: break;
            }
            if(json!=null)
            {
                string retStr = json.ToJson();
                Response.Write(retStr);
                Response.End();
            }
        }
예제 #3
0
 public static string ToJson(this mJsonResult mJsonResult)
 {
     return(Newtonsoft.Json.JsonConvert.SerializeObject(mJsonResult));
 }