如何为续订创建提醒? [英] How do I create a reminder for a renewal?
问题描述
我需要在c#中使用警报功能,当员工登录系统时,他会收到一条警告消息,说他在一周内有续订?
我是c#的新手,编码不是我的专长。这是作业提交。
这是一个Windows窗体应用程序。
续订详细信息在续订表和员工/用户中细节在另一张表中;我可以使用查询来加入/链接它。
静态警报;只提醒续签的员工
请帮助我..谢谢
我尝试了什么:
我一无所知,编码不是我的专业领域
我制作了数据库,以及作业的其他部分,例如创建续订,编辑和查看。
我正在考虑设置用户ID并连接到用户配置文件表,然后将其连接到续订ID,并显示提醒或提醒..
但我不知道如何编码..
I need an alert function in c#, when the employee logs into the system, he gets an alert message saying he has a renewal due in a week?
IM new to c#, and coding is not my specialty. This is an assignment submission.
This is a windows form app.
Renewal details are in a renewal table and employee/user details are in another table; I can use queries to join them / link it.
Static alert; just reminder the employee of the renewal
kindly help me.. Thanks
What I have tried:
Im clueless, and coding is not my field of specialty
I made the db, and other parts of the assignment, such as creating the renewal , editing and viewing.
I was thinking of geting the user ID and connecting to the user profile table and then connecting that to the renewal ID , and displaying the alert or reminder..
but im not sure how to code it..
推荐答案
添加您的Users表的列是RenewalDate - 当用户登录时,检查当前日期的值减去提醒期
这在C#中几乎是微不足道的:
Add a column to your Users table which is a RenewalDate - when the user logs in, check the value against the current date less the "reminder period"
That's almost trivial in C#:
DateTime renewOn = ... get your renew date value from your DB ...
if (renewOn <= DateTime.Now.AddDays(7).Date)
{
... renewal needed
然后你所要做的就是向用户显示警报 - 这又是非常简单的,但是取决于nds你正在编写什么样的系统,以及你想要如何显示它。
Then all you have to do is show the alert to the user - which again is pretty trivial, but depends on what kind of system you are coding for, and exactly how you want to display it.
这篇关于如何为续订创建提醒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!