Sir, I am in a windows application function to send message into mobile phone.
the code below colored red not hitting by the breakpoint, why?( the username and password and sender name has been hided by me)
The variables, to and msg has values.
My c# code is:-
private void SendAfterBookingSMS()
{
try
{
WebClient client = new WebClient();
string to, msg;
to = grdBooking.Sheets[0].Cells[grdBooking.Sheets[0].ActiveRowIndex, 8].Text.ToString();
msg=grdBooking.ActiveSheet.Cells[grdBooking.ActiveSheet.ActiveRowIndex, 9].Text.ToString();
string baseUrl = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=xxxxxx&password=xxxxxx&sendername=xxxx&mobileno='"+to+"'&message='"+msg+"'";
client.OpenRead(baseUrl);
}
catch (Exception)
{
throw;
}
}
{
try
{
WebClient client = new WebClient();
string to, msg;
to = grdBooking.Sheets[0].Cells[grdBooking.Sheets[0].ActiveRowIndex, 8].Text.ToString();
msg=grdBooking.ActiveSheet.Cells[grdBooking.ActiveSheet.ActiveRowIndex, 9].Text.ToString();
string baseUrl = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=xxxxxx&password=xxxxxx&sendername=xxxx&mobileno='"+to+"'&message='"+msg+"'";
client.OpenRead(baseUrl);
}
catch (Exception)
{
throw;
}
}

NathanPosted Mar 1, 2014, 12:00 AM
Now I changed my program to send the sms according to the timer interval. The only function during the booking is the setting the sms status column to false.
I need to find a sql query to check the status of the SMSTATUS column is False:-
SELECT * from A0505 where SMSTATUS='FALSE'
The real function start from here.
I want to send sms to those Phone Numbers whose SMSTATUS='False' in every 30 minutes with the help of a timer. How can possible this?
VulpesPosted Feb 28, 2014, 8:06 AM