当数据库时间与C#Windows应用程序中的系统时间匹配时,如何显示弹出窗口 [英] how to show popup window when database time matches system time in c# windows application

查看:100
本文介绍了当数据库时间与C#Windows应用程序中的系统时间匹配时,如何显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#.net中显示弹出消息.我在DB中存储了不同候选人的面试时间.当系统时间与db中存储的面试计划时间相匹配时,我想显示已安排候选人面试的弹出消息... ..

看到我在数据库中存储了应聘者的面试时间,关于他在公司的面试时间.我有100个应聘者以不同的comapany进行面试.当日期和时间与当前时间和日期匹配时,我想显示弹出消息.阿利,你在6 pm接受采访
提前thnks

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

推荐答案

您需要 Windows服务!

示例:发送自动电子邮件警报的简单Windows服务 [ Windows服务应用程序简介 [ ^ ]
You need a Windows Service!

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

MSDN: Details about Windows Service: Introduction to Windows Service Applications[^]


如果它直接与DateTime相关,请使用DateTime.Compare方法:
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


这篇关于当数据库时间与C#Windows应用程序中的系统时间匹配时,如何显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆