If Tables("员工.附件").Current Is Nothing Then
Return
End If
Dim dr As DataRow = Tables("员工.附件").Current.DataRow
Dim fl As String = ProjectPath & dr("文件名")
If FileSys.FileExists(fl) AndAlso CRCCheckFile(fl) = dr.SQLGetValue("CRC值") Then '如果本地存在同名文件且CRC校验值相同
'则直接使用本地文件
Else '否则从数据库提取文件
If dr.SQLLoadFile("附件",fl) = False Then '如果提取文件失败
Messagebox.Show("附件提取失败,可能并不存在附件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
End If
Dim Proc As New Process '打开文件
Proc.File = fl
Proc.Start()
我不想要通过打开文件才能下载到本地的Project文件夹,所以计划去掉红色这段代码,而想把选中的附件批量下载,如何下图下面的代码
此主题相关图片如下:12121.jpg

Datatables("员工").replaceFor("选中 = true")
For Each dr As DataRow In DataTables("员工").Select("[选中] = true")
'下载一行的代码 ‘直接套上面的代码进去,会显示错,请教一下,如何修改代码才能实现把选中的附件批量下载
Next