在执行内部函数:For Each dr As DataRow In DataTables("sqxxb").DataRows
If dr("sfydr")=False
Dim path As String="D:\贫困大学新生\证明材料\"& dr("nd") & "\" & dr("高中学校") & "\" & dr("申请人姓名")
If FileSys.DirectoryExists(path)=False Then
FileSys.CreateDirectory(path)
End If
Dim sfzjyhkzp As New HttpClient(dr("身份证及资助卡照片"))
sfzjyhkzp.GetFile(path & "\" & dr("申请人姓名") & "身份证.JPG")
Dim lqtzszp As New HttpClient(dr("录取通知书照片"))
lqtzszp.GetFile(path & "\" & dr("申请人姓名") & "通知书.JPG")
If Tables("sqxxb").current.Isnull ("补建档证明材料")=False Then
Dim i As Integer=1
For Each fl As String In Tables("sqxxb").Current.DataRow.Lines("补建档证明材料")
Dim zmcl As New HttpClient(fl)
zmcl.GetFile(path & "\" & dr("申请人姓名") & "补建档_" & i & ".JPG")
i=i+1
Next
End If
dr("zmcl")="D:\贫困大学新生\证明材料\"& dr("nd") & "\" & dr("高中学校") & "\" & dr("申请人姓名")& "\" & dr("申请人姓名") & "身份证.JPG"
dr("sfydr")=True
End If
Next
MessageBox.show("证明材料下载完成")
Return ""
时,为什么嵌套程序:
If Tables("sqxxb").current.Isnull ("补建档证明材料")=False Then
Dim i As Integer=1
For Each fl As String In Tables("sqxxb").Current.DataRow.Lines("补建档证明材料")
Dim zmcl As New HttpClient(fl)
zmcl.GetFile(path & "\" & dr("申请人姓名") & "补建档_" & i & ".JPG")
i=i+1
Next
End If
条件成立时,“补建档证明材料”还是没有下载,即这部分程序不执行? 拿单个记录测试时,是执行的,一放到整个表执行,就一个都不执行了(外部的程序还是正常的),为什么?谢谢!