以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]Dim ids As String  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=78294)

--  作者:xianzheng
--  发布时间:2015/12/6 14:56:00
--  [求助]Dim ids As String

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1.foxdb

下面的代码日期列如果是空白不能正常显示,代码如何改

Dim ids12 As String
Dim cnt12 As Integer
Dim nms12 As String
For Each dr12 As DataRow In DataTables("企业资料").DataRows
    Dim dt12 As Date = dr12("证件期限_营业执照")
\'If e.DataRow.IsNull("证件期限_营业执照")    Then
  \'         Return
  \'  Else
        If Date.Today > dt12  Then
            Cnt12 = cnt12 + 1
            Dim sp12 As TimeSpan = Date.Today - dt12
            Nms12 =  nms12 & "     " & cnt12 &"." & dr12("中文简称") & ":  营业执照已过期" & sp12.TotalDays & "天" & vbcrlf
        End If
   \' End If
Next


If cnt12 > 0  Then
    messagebox.show("有" & cnt12 & "个营业执照已过期,分别是:  "& vbcrlf  & nms12,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If


--  作者:大红袍
--  发布时间:2015/12/6 16:42:00
--  

Dim ids12 As String
Dim cnt12 As Integer
Dim nms12 As String
For Each dr12 As DataRow In DataTables("企业资料").DataRows
    Dim dt12 As Date = dr12("证件期限_营业执照")
    If dr12.IsNull("证件期限_营业执照") Then
       
    Else

        If Date.Today > dt12  Then
            Cnt12 = cnt12 + 1
            Dim sp12 As TimeSpan = Date.Today - dt12
            Nms12 =  nms12 & "     " & cnt12 &"." & dr12("中文简称") & ":  营业执照已过期" & sp12.TotalDays & "天" & vbcrlf
        End If
    End If
Next

If cnt12 > 0  Then
    messagebox.show("有" & cnt12 & "个营业执照已过期,分别是:  "& vbcrlf  & nms12,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 


--  作者:xianzheng
--  发布时间:2015/12/6 22:28:00
--  

谢谢!