private void btnSend_Click(object sender, EventArgs e) { vSendSms.sms_from = txtFrom.Text; vSendSms.sms_to = txtTo.Text; vSendSms.msg_content = txtMessage.Text; try { n.soapSMS(vSendSms); } catch (Exception ex) { } }
private void btnSendSMS_Click(object sender, RoutedEventArgs e) { //vSendSms.schedule = Convert.ToString(dtp.DateTimeSelected); //If (dtp.DateTimeSelected) / Write to some DB and set timer. vSendSms.sms_from = txtFrom.Text; try { if (cbSMS.IsEnabled) { try { n.soapSMS(vSendSms); } catch (Exception exxx) { /// Could have error logging.? n.HttpSMS(vSendSms, vlogin); } if (vSendSms._responce == "") { //Timer t = new Timer(); lblmsgid.Visibility = System.Windows.Visibility.Visible; lblmsgid.Content = "Message send failed."; //t.SetSingleShot(new TimeSpan(3000)); // t.Enabled = true; // lblmsgid.Visibility = System.Windows.Visibility.Collapsed; } else { lblmsgid.Visibility = System.Windows.Visibility.Visible; lblmsgid.Content = "Message sent! Message ID number: " + vSendSms._responce; } } if (cbEmail.IsEnabled) { n.sendEmail(vSendSms); } } catch (Exception ex) { } }