[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

i need to send message to user in time diff

Posted on 2008-02-09
3
Medium Priority
?
203 Views
Last Modified: 2010-04-15
hi there ,
i am connectiong to sms web service
i have appointments and i need to remind  the coustomer abhot his appointments 1 hour befor the
appointments time.

i have 3 parameters :
the Appo time
the Appo time -1 hour
and the time itself

if the appo time is : 12:00
i need to send the reminde message in 11:00
how can i do it ?

thanks ...
0
Comment
Question by:Tech_Men
  • 2
3 Comments
 
LVL 6

Expert Comment

by:monarch_ilhan
ID: 20858081
Send Reminder message to user if it returns true

private bool SendReminder(DateTime dtAppointmentTime)
{
  if(DateTime.Now.AddHours(1)==dtAppointmentTime)
   return true;
 else
 return false;

}
0
 

Author Comment

by:Tech_Men
ID: 20858268
i need to a loop that work all the time
i want to turn the loop every 10 min
and all the app in the range need to get the remind

for exsample :
if there is a cust that has an appo in 12:00
he need to get remind in 11
if the loop start in 11:10 i need to get all the app in the range of 12 -1 houre
0
 
LVL 6

Accepted Solution

by:
monarch_ilhan earned 1500 total points
ID: 20858471
Loop is not what you need. You should use timer object. If you set the interval of timer to 60000 which means every minute, you wont miss any reminder.
Add a timer to your form, set it interval to 60000 (Every minute). Add this code the the Tick event of  timer
//Get all appointments from DB
//I assume your query returns a datatable that contains a column name AppointmentTime

           DataTable dt=GetAllAppointments();

            foreach (DataRow drow in dt.Rows)
            {
                DateTime dtAppointmentTime = (DateTime)drow["AppointmentTime"];
                if (DateTime.Now.AddHours(1) == dtAppointmentTime)
                {
                    //Send reminder
                }

            }


Actually you didnt supply enough information. If you have any code, send it to here and clarify what should be done
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question