Dim ftp1 As New FtpClient
ftp1.Host="172.16.1.1"
ftp1.Account = "admin"
ftp1.Password = "Admin"
ftp1.UTF8=True
If Tables("自助报障记录表").Current.IsNull("问题描述附件")=False Then
If ftp1.DeleteFile("\各表附件\自助报障记录表\" & CurrentTable.Current("问题描述附件")) = True Then
Messagebox.show("截图删除完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("截图删除失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
Dim str_serialno As String = e.Form.Controls("TB_日常问题ID").value & "_" & Format(Date.now, "yyMMddhhmmss") & ".jpg"
bit.save(ProjectPath & "RemoteFiles\" & str_serialno) '保存图片到本地
If ftp1.upload(ProjectPath & "RemoteFiles\" & str_serialno,"\各表附件\自助报障记录表\" & str_serialno)= True Then
Messagebox.show("截图上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("截图上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
ftp1.Close