以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [讨论]结束提醒  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=59900)

--  作者:风声
--  发布时间:2014/11/13 10:57:00
--  [讨论]结束提醒

Dim ydt As Date = Date.Today.AddDays(10)
Dim ydr As DataRow = DataTables("应收款").Find("兑现日期 <= #" & ydt & "#")
If ydr IsNot Nothing Then
    MessageBox.Show("有应收款票据即将到期!","票据兑现到期提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Tables("应收款").Filter = "兑现日期 <= #" & ydt & "#"
    MainTable = Tables("应收款")
End If

 

老师,上述代码是对到期事件的提醒,现在求解除事件处理后不再提醒的代码。


--  作者:有点甜
--  发布时间:2014/11/13 10:58:00
--  
 你代码写在哪里?什么时候不再提醒?
--  作者:风声
--  发布时间:2014/11/13 12:15:00
--  
代码写在项目事件里的,只要对该事件进行操作后(到期前的一个星期)就不再要提醒了。
[此贴子已经被作者于2014-11-13 13:35:45编辑过]

--  作者:有点甜
--  发布时间:2014/11/13 14:11:00
--  

Dim ydt As Date = Date.Today.AddDays(10)

Dim ydt2 As Date = Date.Today.AddDays(-7)
Dim ydr As DataRow = DataTables("应收款").Find("兑现日期 >= #" & ydt2 & "# and 兑现日期 <= #" & ydt & "#")
If ydr IsNot Nothing Then
    MessageBox.Show("有应收款票据即将到期!","票据兑现到期提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Tables("应收款").Filter = "兑现日期 >= #" & ydt2 & "# and 兑现日期 <= #" & ydt & "#"
    MainTable = Tables("应收款")
End If


--  作者:风声
--  发布时间:2014/11/13 15:01:00
--  
谢谢老师
--  作者:风声
--  发布时间:2014/11/14 12:06:00
--  
老师,我要通过逻辑列操作后停止提醒。
--  作者:有点甜
--  发布时间:2014/11/14 12:11:00
--  

 加一列,停止提示

 

Dim ydt As Date = Date.Today.AddDays(10)

Dim ydt2 As Date = Date.Today.AddDays(-7)
Dim ydr As DataRow = DataTables("应收款").Find("兑现日期 >= #" & ydt2 & "# and 兑现日期 <= #" & ydt & "# and 停止提示 = False")
If ydr IsNot Nothing Then
    MessageBox.Show("有应收款票据即将到期!","票据兑现到期提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Tables("应收款").Filter = "兑现日期 >= #" & ydt2 & "# and 兑现日期 <= #" & ydt & "# and 停止提示 = false"
    MainTable = Tables("应收款")
End If

 


--  作者:风声
--  发布时间:2014/11/14 12:22:00
--  
谢谢