TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bineesh Viswanath
NA
1k
777.6k
Execute a function on a particular Date
Apr 26 2014 3:56 AM
Hello Sir,
I need your help.
I am in function of sms sending on Booking date and on 2 days before of consultation.
Here the function of sending sms:-
private void SendSmS()
{
SqlDataReader rdr = null;
int Day = 2;
try
{
string cnn = ConfigurationManager.ConnectionStrings["MSCon"].ToString();
SqlConnection cn = new SqlConnection(cnn);
cn.Open();
SqlCommand cmd = new SqlCommand("Get_PatientPhoneNo", cn);
cmd.CommandType = CommandType.StoredProcedure;
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Phone = rdr["PHONE"].ToString();
DoctorName = rdr["DOCTOR"].ToString();
patientName = rdr["PATIENT"].ToString();
bookingDate =Convert.ToDateTime(rdr["DATE"].ToString());
string msgLine = "Dear " + patientName + ",\nYour Consultation with Dr." + DoctorName + " is fixed for " + bookingDate + ".Please ascertain the exact time in advance";
if (VerifyPhoneNumber(Phone))
{
string strCount = SMS(userID, Pswrd, Phone, msgLine, DoctorName, bookingDate, patientName);
if (strCount == "1")
{
UpdatePhoneNo();
}
}
}
Reminder = bookingDate.AddDays(-2);
}
catch (Exception ex)
{
MessageBox.Show(ex + "SMS03", "SMS", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
I just saved the booking date - 2 days into Reminder. And when the reminder value become true, i want to execute the function of sms
Please help me
Reply
Answers (
2
)
crystal report image problem
in crystal report database is not connected in asp.net