10228310256483736GKEQUANBDYZSTGJX Dim tb1 As Table = e.Form.Controls("Table1").Table Dim r1 As Row = tb1.current If r1 Is Nothing Then Return End If Dim str As String = Functions.Execute("exec_sql2","FHSJ","select top 1 公司名称 from 注册信息",2) If r1("云端路径") = "" Then MessageBox.Show("该行没有上传图片!") Return End If Dim path As String = ProjectPath & "货品图片\" & "" & str & "" & "\" path = path.Replace("project\","") If FileSys.DirectoryExists(path) = False Then FileSys.CreateDirectory(path) End If Dim wjlj As String = r1("云端路径") Dim ex As String = wjlj.SubString(wjlj.LastIndexOf("\") + 1) Dim Proc As New Process '定义一个新的Process Proc.File = path & ex '指定要打开的文件 If FileSys.FileExists(path & ex ) = True Then Proc.Start() Return End If Dim ftp1 As New FtpClient ftp1.Host="202.96.188.109" ftp1.Account = "ftpuser" ftp1.Password = "wushi123" If ftp1.FileExists(r1("云端路径") ) Then '如果存在则下载 If ftp1.Download(r1("云端路径"),path & ex ) Then Proc.Start() Else messagebox.Show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If Else messagebox.Show("此文件不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If 文件管理打开文件 If Functions.Execute("是否有权限","文件管理","查看") = 0 Then messagebox.show("你没有权限使用此窗口!","提示") Return End If Dim tb1 As Table = e.Form.controls("table1").Table Dim r1 As Row = tb1.current If r1 Is Nothing Then Return End If Dim path As String = ProjectPath & "文件管理\" & r1("ID") & "" path = path.Replace("project\","") If FileSys.DirectoryExists(path) = False Then 'FileSys.CreateDirectory(path) r1.DataRow.SQLLoadFile("格式",path) End If If filesys.FileExists(path) Then Dim Proc As New Process '定义一个新的Process Proc.File = path '指定要打开的文件 Proc.Start() Else messagebox.show("不存在 " & path & " 的单据格式 !","提示") Return End If