For Each r As Row In Tables("主窗口_table1").GetCheckedRows
e.StripItem.HideDropDown() ''关闭菜单项目所在的下拉菜单
If (Tables("主窗口_table1").Current("二级目录") = _UserGroup And _UserIsRole.Contains("部门文件管理员")) Or _userIsRole.Contains("系统管理员") Or _userIsRole.Contains("下载权限") Then
If Tables("主窗口_table1").Current IsNot Nothing Then
Dim ftp1 As new ftpclient
Tables("FTP配置信息").Position =0 '移动到第一行,以免出错
ftp1.Host=trim(Tables("FTP配置信息").current("地址"))
ftp1.Account = trim(Tables("FTP配置信息").current("账号"))
ftp1.password = trim(Tables("FTP配置信息").current("密码"))
Dim lj As String = Tables("主窗口_table1").Current("路径")
Dim fp As String = lj
Dim wjm As String = Tables("主窗口_table1").Current("文件名")
Dim hz As String = Tables("主窗口_table1").current("后缀")
'' msgbox(projectpath & "RemoteFiles\" & wjm)
Dim dlg As new folderbrowserdialog
If dlg.showdialog = dialogresult.ok Then
If ftp1.Download(fp,dlg.Selectedpath & "\" & wjm) = True Then
Messagebox.show("下载成功","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
Else
Messagebox.show("对不起,您不是部门文档所有者!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Next
选中多行下载 ,结果只能下载 一个