本文介绍了“触发"一定条件下使用C#/ASP.NET中的方法修改数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.
我有一个关于在特定条件下触发事件或调用方法的问题(例如if(datetime1> datetime2))

基本上,我需要向生日那天午夜在我网站上注册的某人发送生日电子邮件.

然后,每个小时,我需要发送一封包含更新日志的PM给我.


我该怎么办?
我考虑过在母版页上使用LINQ查询,如果(DateTime.Now> Midnight),它会调用某种方法.但这可能会减慢所有网站的运行速度.

解决方案




Hello.
I have a question about firing an event or call a method in a certain condition (eg if(datetime1 > datetime2) )

Basically I need to send birthday emails to someone registered on my website at his/her birthday at Midnight.

Then, each hour, I need to send a PM to me containing an updated log.


How do I do that?
I thought about using LINQ queries on masterpage, and if (DateTime.Now > Midnight) it calls a certain method. But it might slow down all the website.

Are there any solutions?

解决方案




这篇关于“触发"一定条件下使用C#/ASP.NET中的方法修改数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 13:42
查看更多