增加文件时用的
Dim info As new FileInfo(fname)
Dim fp As String ="/Fundingapproval/" & spbh & "/" & FileSys.GetName(fname)
If ftp2.Upload(fname,fp,True) = True Then '若成功上传
删除文件时用的
Dim fl As String = piv.SelectedItem
Dim fd As String=ProjectPath & "RemoteFiles/Fundingapproval/" & spbh & "/" & FileSys.GetName(fl)
If fl > "" Then
If ftp2.FileExists(fl) Then
piv.FTPclient.DeleteFile(fl)
End If
If Filesys.FileExists(fd) Then
Filesys.DeleteFile(fd)
End If
Dim lst As New List(of String)
lst = Tables("资金支付明细").Current.DataRow.Lines("附件")
lst.Remove(fl)
Tables("资金支付明细").Current.DataRow.Lines("附件") = lst
Forms(ck).Controls("fjdz").value=r("附件")
End If