---------------------------
错误
---------------------------
编译错误:未声明名称“path”。
错误代码:Dim dir As String = FileSys.GetParentPath(path & "/" & f)
---------------------------
确定
---------------------------
If e.Col.name = "图片" Then
baseMainForm.WindowState= Windows.forms.FormWindowState.Minimized
ClipBoard.Clear
Dim proc As new Process
proc.File = ApplicationPath & "/capture.exe"
proc.WaitForClose = True
proc.Start
basemainform.WindowState = 2
Dim dir As String = FileSys.GetParentPath(path & "/" & f)
If FileSys.DirectoryExists(dir) = False Then FileSys.CreateDirectory(dir)
ClipBoard.GetImage.save(path & "/" & f)
e.Row(e.Col.name) = f
Dim ftp1 As New FtpClient
ftp1.Host="ftp5001.site4future.com"
ftp1.Account = " tocasa"
ftp1.Password = "Yifan9108"
Dim file As String = "2.项目配图" & "\" &e.Row("订单ID") & "\" & e.Row("楼层")& "\" & "3.报价配图" & "\" & Format( Date.Today,"yyyy-MM-dd")
For Each s As String In file.split("\")
path2 = path2 & "/" & s
If ftp1.DirExists(path2) = False Then
ftp1.MakeDir(path2)
End If
Next
If ftp1.Upload(path & "/" & f, path2 & "/" & e.Row("产品名") &"-" & e.Row("产品号") & ".png") = True Then
'If ftp1.Upload(path & "\" & f, "/" & f) = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
e.cancel = True
Tables("订单清单").Current.Save() '保存文件的行
End If