Foxtable(狐表)用户栏目专家坐堂 → 如何根据档号关联挂接?


  共有5109人关注过本帖树形打印复制链接

主题:如何根据档号关联挂接?

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107811 积分:548406 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/9/13 8:58:00 [显示全部帖子]

参考:http://www.foxtable.com/webhelp/topics/0331.htm

For Each dir As String In FileSys.GetDirectories(projectpath & "attachments\data")
For Each File As String In FileSys.GetFiles(dir)
   dim fn as string = FileSys.GetName(File)
dim dh as string = fn.split(".")(0)
dim dr as datarow = datatables("文件库").find("档号='" & dh & "'")
if dr isnot nothing then
dr("数字档案") = FileSys.GetName(dir) & "\" & fn
end if
Next
Next

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107811 积分:548406 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/9/15 8:59:00 [显示全部帖子]

遍历多个表

for each name as string in {"案卷库","照片案卷",............}
For Each dir As String In FileSys.GetDirectories(projectpath & "attachments\data")
For Each File As String In FileSys.GetFiles(dir)
   dim fn as string = FileSys.GetName(File)
dim dh as string = fn.split(".")(0)
dim dr as datarow = datatables(name).find("档号='" & dh & "'")
if dr isnot nothing then
dr("数字档案") = FileSys.GetName(dir) & "\" & fn
end if
Next
Next
next

 回到顶部