Esempio n. 1
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            smsMgr mgr = new smsMgr(weixin.id);

            #region  //先判断
            string strErr = "";
            if (this.txtcontent.Value.Trim().Length == 0)
            {
                strErr += "短信内容不能为空!";
            }
            if (this.txttel.Value.Trim().Length == 0)
            {
                strErr += "手机号不能为空!";
            }


            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }

            #endregion
            string tel     = txttel.Value.Trim();
            string content = txtcontent.Value.Trim();
            lblRet.Text = mgr.SendSMS(tel, content, "手动发送短信信息");
        }
Esempio n. 2
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            smsMgr mgr = new smsMgr(weixin.id);
            #region  //先判断
            string strErr = "";
            if (this.txtcontent.Value.Trim().Length == 0)
            {
                strErr += "短信内容不能为空!";
            }
            if (this.txttel.Value.Trim().Length == 0)
            {
                strErr += "手机号不能为空!";
            }

            
            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }

            #endregion
            string tel=txttel.Value.Trim();
            string content=txtcontent.Value.Trim();
            lblRet.Text=  mgr.SendSMS(tel, content, "手动发送短信信息");
           

        }
Esempio n. 3
0
 private void ShowInfo()
 {
      //短信条数查询
     Model.wx_userweixin weixin = GetWeiXinCode();  
     smsMgr mgr = new smsMgr(weixin.id);
     lblsmsNum.Text = mgr.getBlance();
 }
Esempio n. 4
0
        private void ShowInfo()
        {
            //短信条数查询
            Model.wx_userweixin weixin = GetWeiXinCode();
            smsMgr mgr = new smsMgr(weixin.id);

            lblsmsNum.Text = mgr.getBlance();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = MXRequest.GetQueryString("keywords");



            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                Model.wx_userweixin weixin = GetWeiXinCode();
                smsMgr mgr = new smsMgr(weixin.id);
                lblsmsNum.Text = mgr.getBlance();

                RptBind(CombSqlTxt(keywords), "createDate desc,id desc");
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = MXRequest.GetQueryString("keywords");

          

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                Model.wx_userweixin weixin = GetWeiXinCode();
                smsMgr mgr = new smsMgr(weixin.id);
                lblsmsNum.Text = mgr.getBlance();

                RptBind(CombSqlTxt(keywords), "createDate desc,id desc");
            }
        }
Esempio n. 7
0
        public void ProcessRequest(HttpContext context)
        {
            //暂只考虑添加留言信息
            context.Response.ContentType = "text/json";
            try
            {

                string openid = MyCommFun.QueryString("openid");//openid
                int formid = MyCommFun.RequestInt("formid");
                int wid = MyCommFun.RequestInt("wid");
                BLL.wx_yy_base ybBll = new BLL.wx_yy_base();
                Model.wx_yy_base baseinfo=ybBll.GetModel(formid);


                BLL.wx_yy_control cBll = new BLL.wx_yy_control();
                BLL.wx_yy_result rBll = new BLL.wx_yy_result();
                Model.wx_yy_result ret = new Model.wx_yy_result();
                IList<Model.wx_yy_control> clist = cBll.GetModelList("formId=" + formid);
                
               // rBll.DeleteByOpenid(openid, formid);
                StringBuilder smsContent = new StringBuilder("活动名称:" + baseinfo.title+ ",客户表单内容:");
                for (int i = 0; i < clist.Count; i++)
                {
                    ret = new Model.wx_yy_result();
                    ret.formId = formid;
                    ret.openid = openid;
                    ret.cId = clist[i].id;
                    ret.userResult = MyCommFun.QueryString("control_" + clist[i].id);
                    ret.cName = clist[i].cName;
                    ret.createDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
                    rBll.Add(ret);
                    smsContent.Append(ret.cName + ":" + ret.userResult+" ");
                }
                if (baseinfo.needSMS)
                {
                    smsMgr smgr = new smsMgr(wid);
                    smgr.SendSMS(baseinfo.phone, smsContent.ToString(),"在线预约",baseinfo.title,baseinfo.id);
                }
                context.Response.Write("{\"success\":\"true\",\"content\":\"提交成功!\"}");

            }
            catch (Exception ex)
            {
                context.Response.Write("{\"success\":\"false\",\"content\":\"系统出现问题,请重新提交!\"}");
            }
        }