我试图设置提醒,并且我遇到了这个错误“BNS错误:尝试创建/更新请求时,操作的开始时间已经过去了。”
在论坛上搜索并使用谷歌搜索找到类似错误的答案,这就是我如何设置提醒,为(m_iSafe2> 0)条件触发异常
if (m_bSafeAlert)
{
if (m_iSafe1 > 0)
{
date = dtStart.AddDays(m_iSafe1);
date = date.Date + time;
noOfDays = m_iUnsafe1 - m_iSafe1;
Reminder Safe1Reminder = new Reminder("Safe1")
{
BeginTime = date,
Title = "Reminder",
Content = "Reminder 1",
};
ScheduledActionService.Add(Safe1Reminder);
}
if (m_iSafe2 > 0) // exception fired
{
date = dtStart.AddDays(m_iSafe2);
date = date.Date + time;
noOfDays = m_iAvgCycleTime - m_iSafe2;
Reminder Safe2Reminder = new Reminder("Safe2")
{
BeginTime = date,
Title = "Reminder",
Content = "Reminder2",
};
ScheduledActionService.Add(Safe2Reminder);
}
我哪里错了?
Alfah
答案 0 :(得分:1)
您尝试使用已经过的预定时间创建提醒