protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SMSServiceDAO dao = new SMSServiceDAO(); SMSServiceConfiguration config = dao.GetSMSConfig(); bindConfig(config); msg.Text = string.Empty; } }
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)); }