Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]样式

1楼
苏州老街 发表于:2025/4/17 8:13:00
 老师好,逻辑列下有两个字段分别是:到期和续签,如果是续签就停止下面代码,周期为一年,一年过后到期不续签重新运行下面代码。 谢谢老师。


If e.Col.Name = "结束时间" Then
    If e.Row.IsNull("结束时间") = False
        If e.Row("结束时间") < Date.Today.AddDays(10)  Then
            e.Style = "到期"
        End If
    End If
End If
2楼
有点蓝 发表于:2025/4/17 8:51:00
If e.Col.Name = "结束时间" Then
    If e.Row.IsNull("结束时间") = False
if e.Row("续签") 
        If e.Row("结束时间").addyears(1) < Date.Today.AddDays(10)  Then
            e.Style = "到期"
        End If
else
        If e.Row("结束时间") < Date.Today.AddDays(10)  Then
            e.Style = "到期"
        End If
endif
    End If
End If
3楼
苏州老街 发表于:2025/4/17 14:09:00
老师,下面代码“结束时间”剩余天数应该为零可还有一天不为零。

Select Case e.DataCol.name
    Case "结束时间"
        If e.DataRow.IsNull("结束时间") Then
            e.DataRow("剩余_年") = Nothing
            e.DataRow("剩余_月") = Nothing
            e.DataRow("剩余_天") = Nothing
        Else
If e.DataCol.Name = "结束时间" And e.DataRow("结束时间") > Date.Today Then
            Dim y,m,d As Integer
            DateYMD(e.DataRow("结束时间"),Date.Today,y,m,d)
            e.DataRow("剩余_年") = y
            e.DataRow("剩余_月") = m
            e.DataRow("剩余_天") = d
End If
        End If
End Select

4楼
有点蓝 发表于:2025/4/17 14:37:00
都符合【e.DataRow("结束时间") > Date.Today】这个条件了,怎么可能为0
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.