示例#1
0
        public JsonResult UnSubscribe()
        {
            Api     API   = new Api();
            VapidBe vapid = new VapidBe();

            vapid.PersonId = ViewBag.USER.PersonId;
            string url = "Subscribe/UnSubscribe";
            Dictionary <string, string> arg = new Dictionary <string, string>()
            {
                { "String1", JsonConvert.SerializeObject(vapid) },
            };
            var result = API.Post <string>(url, arg);

            return(new JsonResult {
                Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
示例#2
0
        public JsonResult Subscribe(string data)
        {
            Api API      = new Api();
            var oVapidBe = new VapidBe();

            oVapidBe.Subs     = data;
            oVapidBe.PersonId = ViewBag.USER.PersonId;
            string url = "Subscribe/Subscribe";
            Dictionary <string, string> arg = new Dictionary <string, string>()
            {
                { "String1", JsonConvert.SerializeObject(oVapidBe) }
            };
            var result = API.Post <string>(url, arg);

            return(new JsonResult {
                Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }