以文本方式查看主题

-  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=46369)

--  作者:身份不明
--  发布时间:2014/2/21 17:38:00
--  关于提醒的代码问题,求助!

MainTable=Tables("订单")
Dim dt As Date = Date.Today.AddDays(2)
Dim dr As DataRow = DataTables("订单").Find("交货日期 <= #" & dt & "#")
If dr IsNot Nothing Then
    MessageBox.Show("有产品即将到交货期,还没有及时入库!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Tables("订单").Filter = "交货日期 <= #" & dt & "#"
    MainTable = Tables("订单")
End If

 

上述代码是我设置的页面提醒,当切换到该订单页面时,会自动提醒并显示还没有及时入库的产品。

我想在里面加个条件:下面的代码如果已经入库或者实际入库数量不为0,提醒取消。改如何写代码呢!

If e.Row("已经入库")=False AndAlso e.Row("实际入库数量")<=0 Then


--  作者:Bin
--  发布时间:2014/2/21 17:44:00
--  
If dr IsNot Nothing Then
   If dr("已经入库")=False AndAlso dr("实际入库数量") <= 0 Then
    MessageBox.Show("有产品即将到交货期,还没有及时入库!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Tables("订单").Filter = "交货日期 <= #" & dt & "#"
    MainTable = Tables("订单")
   end if
End If