以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  导入到关联表  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=183891)

--  作者:wlj88868
--  发布时间:2022/11/17 21:19:00
--  导入到关联表

Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog
dlg.Filter = "Excel|*.xlsx" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
    Dim mg As New Merger
     mg.Format = "excel"
    mg.SourcePath = dlg.FileName
    mg.SourceTableName = "出库明细$"
    mg.DataTableName = "出库明细"
    mg.Merge()
End If

 

 

导入后出库日期和出库单号不会增加出库列表的日期和单号,,改导入表名“出库列表.出库明细”又不行,要怎么改出库明细的日期和单号关联到出库列表

麻烦老师给提示一下


--  作者:有点蓝
--  发布时间:2022/11/17 21:56:00
--  
方法1、
dim id as integer = datatables("出库明细").compute("max(_identify)")

Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog
dlg.Filter = "Excel|*.xlsx" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
    Dim mg As New Merger
     mg.Format = "excel"
    mg.SourcePath = dlg.FileName
    mg.SourceTableName = "出库明细$"
    mg.DataTableName = "出库明细"
    mg.Merge()

dim r as row = tables("出库列表").current

datatables("出库明细").replacefor("出库单号",r("出库单号"),"_identify >" & id)

datatables("出库明细").replacefor("出库日期",r("出库日期"),"_identify >" & id)

End If


2、使用这种方法导入:http://www.foxtable.com/webhelp/topics/2334.htm


--  作者:wlj88868
--  发布时间:2022/11/17 22:46:00
--  

谢谢老师,,我试一下