protected void btnValidate_Click(object sender, EventArgs e) { try { if (string.IsNullOrWhiteSpace(this.txtMobile.Text)) { lblMsg.Text = "请输入手机号码!"; return; } if (string.IsNullOrWhiteSpace(this.txtUser.Text)) { lblMsg.Text = "请输入身份账号!"; return; } if (string.IsNullOrWhiteSpace(this.txtPwd.Text)) { lblMsg.Text = "请输入身份密码!"; return; } Dictionary <string, string> list = XmlHelper.GetNode(); bool result = false; if (list != null) { foreach (KeyValuePair <string, string> kvp in list) { if (kvp.Key == this.txtUser.Text.ToLower() && kvp.Value == MD5Helper.MD5Encrypt32bit(this.txtPwd.Text.ToLower())) { result = true; LogHelper.Info("当前操作员使用账号" + kvp.Key + "发送一条测试短信。"); string insertSql = "insert into tb_Sms_Down (mobile,msg,creatorId,creator,c_time,sendFlag,errMsg,sendTime,stype,pipeId,levelNum,sysPlatform) " + "Values('{0}','{1}{2}',{3},'{4}','{5}',{6},'{7}','{8}',{9},{10},{11},{12})"; string sql = string.Format(insertSql, this.txtMobile.Text, _autograph, "若接收到此短信表示测试推送服务部署成功!", 0, 0, DateTime.Now, (int)SendFlag.未发送, "", DateTime.Now.AddSeconds(4), (int)SendType.一般短信, _pipeId, 0, (int)Platform.网站系统); int num = SQLHelp.ExecuteNonQuery(sql, CommandType.Text, null); if (num > 0) { lblMsg.Text = "数据插入成功!若1分钟收不到短信信息,则推送服务失败。"; } else { lblMsg.Text = "插入数据异常!"; } break; } } } if (!result) { lblMsg.Text = "身份认证输入错误!"; } } catch (Exception ex) { lblMsg.Text = ex.Message; } }
private void report() { StringBuilder sb = new StringBuilder(); sb.Append("regcode=ZXHD-CRM-0100-ZMVCBP"); sb.Append("&pwd=" + MD5Helper.MD5Encrypt32bit("79268835"));//b83f586a65e82faa11976a79c627630d sb.Append("&key=077be2c9df20b1c08a3d7df3d60f837d"); string result = NetHelper.RequestGetUrl("http://sms.pica.com:8082/zqhdServer/getreport.jsp?" + sb.ToString()); LogHelper.Info(result); }
private void sendSMS() { StringBuilder sb = new StringBuilder(); sb.Append("regcode=ZXHD-CRM-0100-ZMVCBP"); sb.Append("&pwd=" + MD5Helper.MD5Encrypt32bit("79268835")); sb.Append("&phone=13031190350"); sb.Append("&CONTENT=" + HttpUtility.UrlEncode("【和合益生】min测试56", Encoding.GetEncoding("GBK"))); sb.Append("&extnum=&level=1&schtime=null&reportflag=1&url=&smstype=0&key=077be2c9df20b1c08a3d7df3d60f837d"); string result = NetHelper.RequestGetUrl("http://sms.pica.com:8082/zqhdServer/sendSMS.jsp?" + sb.ToString()); if (!string.IsNullOrWhiteSpace(result)) { string strTest = Regex.Match(result, @"(?<=<result>)(.*?)(?=</result>)").Value; } LogHelper.Info(result); }
private void reg2() { StringBuilder sb = new StringBuilder(); sb.Append("regcode=ZXHD-CRM-0100-ZMVCBP"); sb.Append("&pwd=" + MD5Helper.MD5Encrypt32bit("79268835"));//b83f586a65e82faa11976a79c627630d sb.Append("&key=077be2c9df20b1c08a3d7df3d60f837d"); sb.Append("&CNAME=和合益生(北京)诊所有限公司"); sb.Append("&ENAME=heheyisheng"); sb.Append("&CSNAME=和合益生"); sb.Append("&ESNAME=hhys"); sb.Append("&ENTERPRISETYPEID=01"); sb.Append("&ADDR=北京市朝阳区北四环中路 房地首华大厦东北侧裙楼二层"); sb.Append("&LINKTEL=010-53380976"); sb.Append("&LINKMAN="); sb.Append("&[email protected]"); sb.Append("&FAX="); sb.Append("&POSTCODE=100101"); sb.Append("&MOBILETEL=13661019024"); string result = NetHelper.RequestGetUrl("http://sms.pica.com:8082/zqhdServer/reg.jsp?" + sb.ToString()); LogHelper.Info(result); }
private void reg() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("regcode", "ZXHD-CRM-0100-ZMVCBP"); dict.Add("pwd", MD5Helper.MD5Encrypt32bit("79268835")); // dict.Add("key", "077be2c9df20b1c08a3d7df3d60f837d"); // dict.Add("CNAME", "和合益生(北京)诊所有限公司"); // dict.Add("ENAME", "heheyisheng"); // dict.Add("CSNAME", "和合益生"); // dict.Add("ESNAME", "hhys"); // dict.Add("ENTERPRISETYPEID", "01"); // dict.Add("ADDR", "北京市朝阳区北四环中路 房地首华大厦东北侧裙楼二层"); // dict.Add("LINKTEL", "010-53380976"); // dict.Add("LINKMAN", ""); // dict.Add("EMAIL", "*****@*****.**"); // dict.Add("FAX", ""); // dict.Add("POSTCODE", "100101"); // dict.Add("MOBILETEL", "13661019024"); // string result = NetHelper.RequestPostUrl("http://sms.pica.com:8082/zqhdServer/reg.jsp", dict); LogHelper.Info(result); }