Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.5
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 30-Aug-12 1:03am
Edited 30-Aug-12 1:54am
v2
Comments
Wes Aday at 30-Aug-12 7:38am
   
Was there some sort of a question mixed in there somewhere hidden?
16041984 at 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
Wes Aday at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You need a Windows Service!
 
Sample: Simple Windows Service which sends auto Email alerts[^]
 
MSDN: Details about Windows Service: Introduction to Windows Service Applications[^]
  Permalink  
Comments
Wes Aday at 30-Aug-12 8:21am
   
He wants to show a popup message of some kind so that leaves out a service.
Sandeep Mewara at 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?
Wes Aday at 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 at 30-Aug-12 8:57am
   
Agree. :thumbsup:
 
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If its straight forward DateTime related stuff, use DateTime.Compare method:
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
  Permalink  
Comments
16041984 at 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 INDIA Bangalore at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 30 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100