Dim ftp1 As FtpClient =e.DataCol.FTPClient
Dim dr As DataRow = e.DataRow
If dr.IsNull("图号") Then
MessageBox.Show("图号不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
Else
Dim fp As String ="/tudoc/" & e.DataRow("图号")
If ftp1.DirExists(fp)=False Then
If ftp1.MakeDir(fp)
End If
End If
ftp1.RootDir = fp
ftp1.OpenManager
If Forms("图纸编辑").Opened Then
Dim fm1 As WinForm.FileManager = Forms("图纸编辑").Controls("FileManager1")
Dim ftp2 As FtpClient = fm1.FTPclient
If ftp2.DirExists(fp)=False Then
ftp2.MakeDir(fp)
End If
ftp2.RootDir = fp
End If
End If