如何跟踪在C#/ SQL Server中的重复日历事件? [英] How do I track a repeating calendar event in C# / SQL Server?
问题描述
我想在应用程序中显示的日期/时间显示的重复事件。这个日期时间显示可以采取一个日历的形式,但它也可能仅仅是即将发生的事件的列表。
I'd like to display a repeating event on a date/time display in an app. This date time display can take the form of a calendar, but it could also just be a list of upcoming events.
什么是处理跟踪此事件的最好方式,可以重复?
的例如:如果事件在数据库中存储一次,并推算出在显示代码/反复几次?如果事件被存储几次,然后就呈现?的
推荐答案
我以前做过这样的事情,我根据我的架构关闭的SQL Server sysschedules表。
I did something like this before and I based my schema off of SQL Servers sysschedules table.
的 http://technet.microsoft.com/en-us/library/ms178644.aspx
以上链接的模式将让你存储日程安排作业(事件)。然后,你可以计算出基于该时间表的发生对事件具体日期。这可能是一个漫长的计算,所以我会尝试导致地方缓存。
The schema linked above will allow you to store the schedule for a job (event). Then you can calculate what dates the event occurs on based off of the schedule. This may be a lengthy calculation, so I would try to cache that result somewhere.
这篇关于如何跟踪在C#/ SQL Server中的重复日历事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!