老师,添加附件代码如下,我删除行怎么删除对应行路径的附件呢?
Dim dlg As New openFileDialog '定义一个新的SaveFileDialog
dlg.MultiSelect = True
If dlg.showDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ftp1 As new ftpclient
ftp1.host="000.00.000.0"
ftp1.Account = "******"
ftp1.password = "*******"
Dim r As Row = Tables("人员证件").Current
Dim ls = r.DataRow.Lines("证件缩略图")
For Each f As String In dlg.FileNames
Dim file = "/人员证件/" & r("姓名") & "/" & filesys.GetName(f)
If ftp1.DirExists("/人员证件/" & r("姓名")) = False Then
ftp1.MakeDir("/人员证件/" & r("姓名"))
End If
Dim Result As DialogResult
If ftp1.FileExists(file) Then
Result = MessageBox.Show("文件已经存在,是否覆盖?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
End If
If result = Nothing OrElse result = DialogResult.Yes Then
If ftp1.Upload(f,file,True) = True Then
If ls.contains(file) = False Then
ls.add(file)
End If
Else
MessageBox.Show( f & "上传失败" ,"提示" ,MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
Next
r.DataRow.lines("证件缩略图") = ls
ftp1.Close
End If