Example #1
0
        /// <summary>
        /// 进行推送消息
        /// </summary>
        /// <returns></returns>
        public string PushUserForm()
        {
            string openId = "";
            string formId = "";
            string data   = HttpContext.Request.QueryString["data"].ToString();//机构id
            int    orgId  = 0;

            int.TryParse(data, out orgId);
            if (orgId == 0)
            {
                return("");
            }

            try
            {
                openId = HttpContext.Request.QueryString["openId"].ToString();
                formId = HttpContext.Request.QueryString["formId"].ToString();



                SendSmall sendSmall = new SendSmall();
                sendSmall.OpenId = openId;
                sendSmall.FormId = formId;
                sendSmall.OrgId  = orgId;

                int num = newsBll.PushSmall(sendSmall);
                if (num > 0)
                {
                    return("推送成功");
                }
                else
                {
                    return("推送失败");
                }
            }


            catch (Exception ex)
            {
                Response.Write("openId:" + openId + "|formId:" + formId);
            }



            return("openId:" + openId + "|formId:" + formId);
        }