Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid    = MyCommFun.RequestInt("wid");
                id     = MyCommFun.RequestInt("id");
                openid = MyCommFun.RequestOpenid();
                if (wid == 0 || id == 0)
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }
                BLL.wx_yy_base   yyBll = new BLL.wx_yy_base();
                Model.wx_yy_base yuyue = yyBll.GetModel(id);

                if (yuyue.needPIC)
                {
                    StringBuilder sb = new StringBuilder("");
                    sb.Append(" <li class=\"nob\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"kuang\">\r\n<tr>");
                    sb.Append("  <th>图片 </th> <td> <input id=\"picUpload\" name=\"picUpload\" type=\"file\" accept=\"image/jpeg, image/jpg, image/png\"  onchange=\"my.changeImg(this, event, {base_url:'http://img.uweixin.cn/'});\"/><br />");
                    sb.Append(" <img src='\\images\\noneimg.jpg' id=\"img_show\" style=\"max-width:100px; max-height:80px;\"> </td> </tr> </tbody> </table> </li>");
                    litPic.Text = sb.ToString();
                }

                #region 预约的基本信息
                StringBuilder sbBase = new StringBuilder("");
                if (yuyue.picUrl != null && yuyue.picUrl.Trim() != "")
                {
                    sbBase.Append(" <div class=\"qiandaobanner\"><img src=\"" + yuyue.picUrl + "\"></div>\r\n");
                }

                if (yuyue.content != null && yuyue.content.Trim().Length > 0)
                {
                    sbBase.Append(" <ul class=\"round\"><li><h2>说明</h2><div class=\"text\">" + yuyue.content + "</div></li></ul>\r\n");
                }
                if (yuyue.phone != null && yuyue.phone.Trim() != "" && yuyue.addr != null && yuyue.addr.Trim() != "")
                {
                    //预约电话或者地址
                    sbBase.Append(" <ul class=\"round\">");

                    if (yuyue.addr != null && yuyue.addr.Trim() != "")
                    {
                        sbBase.Append("<li class=\"addr\"><span>" + yuyue.addr.Trim() + "</span></li>\r\n");
                    }
                    if (yuyue.phone != null && yuyue.phone.Trim() != "")
                    {
                        sbBase.Append("<li class=\"tel\"><a href=\"tel:" + yuyue.phone.Trim() + "\"><span>" + yuyue.phone.Trim() + " 电话</span> </a></li>\r\n");
                    }

                    sbBase.Append("</ul>");
                }

                litBaseInfo.Text = sbBase.ToString();
                #endregion

                this.Title = yuyue.title;
                BindControlers(id);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid = MyCommFun.RequestInt("wid");
                id = MyCommFun.RequestInt("id");
                openid = MyCommFun.RequestOpenid();
                if (wid == 0 || id==0 )
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }
                BLL.wx_yy_base yyBll = new BLL.wx_yy_base();
                Model.wx_yy_base yuyue = yyBll.GetModel(id);

                #region 预约的基本信息
                StringBuilder sbBase = new StringBuilder("");
                if (yuyue.picUrl != null && yuyue.picUrl.Trim() != "")
                {
                    sbBase.Append(" <div class=\"qiandaobanner\"><img src=\""+yuyue.picUrl+"\"></div>\r\n");
                }

                if (yuyue.content != null &&  yuyue.content.Trim().Length > 0)
                {
                    sbBase.Append(" <ul class=\"round\"><li><h2>说明</h2><div class=\"text\">"+yuyue.content+"</div></li></ul>\r\n");
                }
                if (yuyue.phone != null && yuyue.phone.Trim() != "" && yuyue.addr!=null && yuyue.addr.Trim()!="" )
                { 
                    //预约电话或者地址
                    sbBase.Append(" <ul class=\"round\">");

                    if (yuyue.addr != null && yuyue.addr.Trim() != "")
                    {
                        sbBase.Append("<li class=\"addr\"><span>" + yuyue.addr.Trim() + "</span></li>\r\n");
                    }
                    if (yuyue.phone != null && yuyue.phone.Trim() != "")
                    {
                        sbBase.Append("<li class=\"tel\"><a href=\"tel:" + yuyue.phone.Trim() + "\"><span>" + yuyue.phone.Trim() + " 电话</span> </a></li>\r\n");
                    }

                    sbBase.Append("</ul>");

                }

                litBaseInfo.Text = sbBase.ToString();
                #endregion

                this.Title = yuyue.title;
                BindControlers(id);
            }

        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid    = MyCommFun.RequestInt("wid");
                id     = MyCommFun.RequestInt("id");
                openid = MyCommFun.RequestOpenid();
                if (wid == 0 || id == 0)
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }
                BLL.wx_yy_base   yyBll = new BLL.wx_yy_base();
                Model.wx_yy_base yuyue = yyBll.GetModel(id);

                #region 预约的基本信息
                StringBuilder sbBase = new StringBuilder("");
                if (yuyue.picUrl != null && yuyue.picUrl.Trim() != "")
                {
                    sbBase.Append(" <div class=\"qiandaobanner\"><img src=\"" + yuyue.picUrl + "\"></div>\r\n");
                }

                if (yuyue.content != null && yuyue.content.Trim().Length > 0)
                {
                    sbBase.Append(" <ul class=\"round\"><li><h2>说明</h2><div class=\"text\">" + yuyue.content + "</div></li></ul>\r\n");
                }
                if (yuyue.phone != null && yuyue.phone.Trim() != "" && yuyue.addr != null && yuyue.addr.Trim() != "")
                {
                    //预约电话或者地址
                    sbBase.Append(" <ul class=\"round\">");

                    if (yuyue.addr != null && yuyue.addr.Trim() != "")
                    {
                        sbBase.Append("<li class=\"addr\"><span>" + yuyue.addr.Trim() + "</span></li>\r\n");
                    }
                    if (yuyue.phone != null && yuyue.phone.Trim() != "")
                    {
                        sbBase.Append("<li class=\"tel\"><a href=\"tel:" + yuyue.phone.Trim() + "\"><span>" + yuyue.phone.Trim() + " 电话</span> </a></li>\r\n");
                    }

                    sbBase.Append("</ul>");
                }

                litBaseInfo.Text = sbBase.ToString();
                #endregion

                this.Title = yuyue.title;
                BindControlers(id);
            }
        }
Ejemplo n.º 4
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\":\"系统出现问题,请重新提交!\"}");
            }
        }
Ejemplo n.º 5
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\":\"系统出现问题,请重新提交!\"}");
            }
        }