If e.Book.TempLate = "111" Then
If e.region = "table_3" Then
Dim ftp1 As new ftpclient
ftp1.host="172.16.120.41"
ftp1.Account = "admin"
ftp1.password = "qw123"
If e.DataRow.IsNull("图片") = False Then '身份证号码是否为空
Dim fls As List(of String) = e.DataRow.Lines("图片")
For i As Integer = 0 To fls.count - 1
Dim file As String = "d:\data\Desert" & i & ".jpg"
If ftp1.Download(fls(i),file) = True Then
Dim img As image = getImage(file)
If img IsNot Nothing
Dim bmp1 As new bitmap(img, 200,200 * (img.height / img.width))
bmp1.save(ProjectPath & "Images\图片" & i+1 & ".jpg")
bmp1.Dispose
If fls.count = 1 Then
Dim bmp As new bitmap(1,1)
bmp.save(ProjectPath & "Images\图片2.jpg")
bmp.Dispose
End If
End If
End If
Next
Else
Dim bmp As new bitmap(1,1)
bmp.save(ProjectPath & "Images\图片1.jpg")
bmp.Dispose
bmp = new bitmap(1,1)
bmp.save(ProjectPath & "Images\图片2.jpg")
bmp.Dispose
End If
End If
End If
If FileSys.DirectoryExists("d:\data") Then '如果目录C:\MyFolder存在
FileSys.DeleteDirectory("d:\data",2,3) '则删除之
End If