MySMSServerSendTo.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class SMS_MySMSServerSendTo : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 模板 
  15.     /// </summary>
  16.     Model.SMSServer MR = new Model.SMSServer();
  17.     /// <summary>
  18.     /// 业务
  19.     /// </summary>
  20.     BLL.SMSServer BR = new BLL.SMSServer();
  21.     protected void Page_Load(object sender, EventArgs e)
  22.     {
  23.      
  24.             InfoNameId_TextBox.Text = SessionInclude.SessionId;
  25.             Info_TextBox.Text = "别忘了签到或签退!";
  26.       
  27.     }
  28.     protected void Button1_Click(object sender, EventArgs e)
  29.     {
  30.         try
  31.         {
  32.             if (InfoNameId_TextBox.Text == "")
  33.             {
  34.                 throw new Exception("接收者不能为空!");
  35.          
  36.             }
  37.             DateTime dtm=new DateTime();
  38.             if (!DateTime.TryParse(TitleTime_TextBox.Text ,out dtm))
  39.             {
  40.                 throw new Exception("提示时间格式不正确!");
  41.             }
  42.             if (Info_TextBox.Text == "")
  43.             {
  44.                 throw new Exception("信息不能为空!");
  45.             }
  46.             MR.FSNR = Info_TextBox.Text;
  47.             MR.FSDX = InfoNameId_TextBox.Text;
  48.             MR.TSSJ = dtm;
  49.             
  50.             //SMSSend.Send(SessionInclude.SessionId, InfoNameId_TextBox.Text.Replace(",", ""), Info_TextBox.Text, "SMS/SMSManager.aspx", SMSType.普通发送);
  51.             if (CheckBox1.Checked)
  52.             {
  53.                 MR.SFFSDX = 1;
  54.                 //  SMSSend.Send(SessionInclude.SessionId, InfoNameId_TextBox.Text.Replace(",", ""), Info_TextBox.Text, "SMS/SMSManager.aspx", SMSType.短信发送);
  55.             }
  56.             else
  57.             {
  58.                 MR.SFFSDX = 0;
  59.             }
  60.             if (CheckBox2.Checked)
  61.             {
  62.                 MR.TSLX = "0";
  63.             }
  64.             else
  65.             {
  66.                 MR.TSLX = "1";
  67.             }
  68.             BR.Add(MR);
  69.             MessageBox.Show("插入成功!", "SMSServer.aspx");
  70.         }
  71.         catch (Exception exp)
  72.         {
  73.             MessageBox.Show(exp.Message);
  74.         }
  75.     }
  76. }