Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         SMSServiceDAO           dao    = new SMSServiceDAO();
         SMSServiceConfiguration config = dao.GetSMSConfig();
         bindConfig(config);
         msg.Text = string.Empty;
     }
 }
Ejemplo n.º 2
0
        protected bool SendSMS(string number, string message)
        {
            SMSServiceConfiguration config       = new SMSServiceDAO().GetSMSConfig();
            SMSClientConfiguration  clientConfig = new SMSClientConfiguration()
            {
                Username   = config.Username
                , Password = config.Password
                , TestOnly = config.IsTest
                , Sender   = config.Sender
            };
            SMSClient client = new SMSClient(clientConfig);

            return(client.Send(number, message, config.IsFlash));
        }