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
If ClipBoard.GetImage IsNot Nothing Then
Dim f As String = e.Row("客户名称") & "\" & e.Row("楼层")& "\" & "3.报价配图" & "\" & Format( Date.Today,"yyyy-MM-dd") & "\"& e.Row("产品名") &"-" & e.Row("产品号")&".png"
Dim path As String = e.Col.DataCol.DefaultFolder
If path = "" Then
path = Vars("IPM")
End If
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="47.0"
ftp1.Account = "foftp"
ftp1.Password = "Y08"
Dim path As String = ""
Dim file As String = e.Row("客户名称") & "\" & e.Row("楼层")& "\" & "3.报价配图" & "\" & Format( Date.Today,"yyyy-MM-dd")
For Each s As String In file.split("\")
path = path & "/" & s
If ftp1.DirExists(path) = False Then
ftp1.MakeDir(path)
End If
Next
If ftp1.Upload(path & "/" & f,f) = 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
这样吗 就是会同时保存在本地和ftp上