Click here to Skip to main content
15,919,778 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i want to show pop message in c#.net.i stored interview time for different candidates in DB.when system time matches with interview scheduled time stored in db i want to show pop up message that candidate interview is scheduled.....

see i am stored interview time for candidate in db on what time he have interview in company.i have 100 of candidate going for interview in different comapany.when date and time matches with current time and date i want to show pop up message..aley u have interview on 6 pm
thnks in advance
Posted
Updated 30-Aug-12 1:54am
v2
Comments
[no name] 30-Aug-12 7:38am    
Was there some sort of a question mixed in there somewhere hidden?
16041984 30-Aug-12 7:54am    
see i am stored interview time for candidate in db on what time he have interview in company.i have 100 of candidate going for interview in different comapany.when date and time matches with current time and date i want to show pop up message..aley u have interview on 6 pm
[no name] 30-Aug-12 8:23am    
Since you don't really have a question, you need to write an application to do this that monitors the system time and checks the times in the database.

You need a Windows Service!

Sample: Simple Windows Service which sends auto Email alerts[^]

MSDN: Details about Windows Service: Introduction to Windows Service Applications[^]
 
Share this answer
 
Comments
[no name] 30-Aug-12 8:21am    
He wants to show a popup message of some kind so that leaves out a service.
Sandeep Mewara 30-Aug-12 8:28am    
Agree if it has to be exact 'popup'.

To avoid continuous polling (By having an application sitting in taskbar), from service, at an interval a custom applicaiton could be launched using Process.Start that will take care of showing the alert message. What say?
[no name] 30-Aug-12 8:55am    
That could work. I think it's a bad way to do something like this either way anyway. I think we are missing some information that we would need to come up with a better solution.
Sandeep Mewara 30-Aug-12 8:57am    
Agree. :thumbsup:

If its straight forward DateTime related stuff, use DateTime.Compare method:
C#
DateTime date1 = new DateTime(2009, 8, 1, 0, 0, 0);
DateTime date2 = new DateTime(2009, 8, 1, 12, 0, 0);
int result = DateTime.Compare(date1, date2);
string relationship;

if (result < 0)
   relationship = "is earlier than";
else if (result == 0)
   relationship = "is the same time as";         
else
   relationship = "is later than";

Console.WriteLine("{0} {1} {2}", date1, relationship, date2);
// output: 
// 8/1/2009 12:00:00 AM is earlier than 8/1/2009 12:00:00 PM
 
Share this answer
 
Comments
16041984 30-Aug-12 8:10am    
i stored all interview time in time column how can i comapre the both time and date any ides...i m newbie
Kumar, Ravikant 30-Aug-12 8:29am    
On an interval/Timer Tick probably you have to compare each DateTime of TimeColumn from current DateTime in for loop.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900