MySMSSendTo.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class SMS_MySMSSendTo : System.Web.UI.Page
- {
- Model.Sms MS = new Model.Sms();
- BLL.Sms BS = new BLL.Sms();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (Request.QueryString["id"] != null)
- {
- InfoNameId_TextBox.Text = Server.UrlDecode(Request.QueryString["id"].ToString());
- Info_TextBox.Text = "麻烦您抽时间帮我办理下!";
- }
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- try
- {
- if (InfoNameId_TextBox.Text == "")
- {
- throw new Exception("接收者不能为空!");
- }
- if (Info_TextBox.Text == "")
- {
- throw new Exception("信息不能为空!");
- }
- SMSSend.Send(SessionInclude.SessionId, InfoNameId_TextBox.Text.Replace(",", ""), Info_TextBox.Text, "SMS/SMSManager.aspx", SMSType.普通发送);
- if (CheckBox1.Checked)
- {
- SMSSend.Send(SessionInclude.SessionId, InfoNameId_TextBox.Text.Replace(",", ""), Info_TextBox.Text, "SMS/SMSManager.aspx", SMSType.短信发送);
- }
-
- MessageBox.Show("发送成功!", "SMSManager.aspx");
- }
- catch (Exception exp)
- {
- MessageBox.Show(exp.Message);
- }
- }
- }