以文本方式查看主题

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

--  作者:douglas738888
--  发布时间:2015/11/20 17:10:00
--  日期与逻辑列问题
请教老师,我想实现上班计时列小于00,迟到的逻辑列自动打钩,早到和等于上班时限08:30,迟到的逻辑列不自动打钩
我设计的是:上班时间(Time)- 上班时限(Time)08:30 = 上班计时(双精度)
                 如果上班时间是08:30,与上班时限相减后,上班计时显示为00

执行下面代码,都打钩了,该怎样写代码

If e.DataCol.name = "上班计时" Then
If e.DataRow("上班计时") <  e.newvalue = "00" Then
    e.DataRow("迟到")=True
Else
  e.DataRow("迟到")=False
End If
End If

--  作者:大红袍
--  发布时间:2015/11/20 17:25:00
--  
If e.DataCol.name = "上班计时" Then
    If e.DataRow("上班计时") <= 0 Then
        e.DataRow("迟到")=True
    Else
        e.DataRow("迟到")=False
    End If
End If