文件管理器中,按编号生成了文件夹,本行上传的文件位置就是按编号生成的文件夹,代码怎么改?
Dim TP2 As WinForm.FileManager = e.Form.Controls("FileManager1")
TP2.Remote = False
tp2.FolderName = ProjectPath & "成本分析\" & Tables("表A").current("客户")& "\" & Tables("表A").current("编号")
表属性BeforeAddFile创建文件加代码:
If e.DataCol.name = "多文件件" Then
If e.DataRow.IsNull("客户") = False Then
If FileSys.DirectoryExists(ProjectPath & "成本分析\" & e.DataRow("客户")) = False Then '如果目录C:\MyFolder存在
FileSys.CreateDirectory(ProjectPath & "成本分析\" & e.DataRow("客户"))
'MessageBox.Show("成本分析\" & e.DataRow("客户"))
End If
If e.DataRow.IsNull("编号") = False Then
If FileSys.DirectoryExists(ProjectPath & "成本分析\" & e.DataRow("客户") & "\" & e.DataRow("编号")) = False Then '如果目录C:\MyFolder存在
FileSys.CreateDirectory(ProjectPath & "成本分析\" & e.DataRow("客户")& "\" & e.DataRow("编号"))
End If
End If
End If
e.path = ProjectPath & "成本分析\" & e.DataRow("客户")& "\" & e.DataRow("编号")
End If
此主题相关图片如下:111.png
此主题相关图片如下:222.png