以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=159440) |
||||
-- 作者:lzxi -- 发布时间:2020/12/26 18:12:00 -- [求助] 材料表=流水账,东仓库=花岗岩,1号,东仓库需要在材料表里获取关于花岗岩,1号的数据 If e.DataCol.Name = "材料表" Then
Dim nms() As String = {"花岗岩","1号","日期","库类""形态","品类""性质","供应商或生产方""领用人","车牌号","车辆数""规格","运输起点""运输终点","运输距离""计量规格","计量单位","数量""单价","金额"} If e.NewValue Is Nothing Then For Each nm As String In nms e.DataRow(nm) = Nothing Next Else Dim dr As DataRow dr = DataTables("花岗岩").Find("[1号] = \'" & e.NewValue & "\'") If dr IsNot Nothing For Each nm As String In nms e.DataRow(nm) = dr(nm) Next End If End If End If
[此贴子已经被作者于2020/12/26 18:16:14编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2020/12/27 19:58:00 -- http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=50080 代码到表属性里设置。 建议先花点时间完整看看这2章:http://www.foxtable.com/webhelp/topics/1592.htm |
||||
-- 作者:lzxi -- 发布时间:2020/12/28 9:39:00 -- 哎呀,代码写上去没有反应,材料表=流水账,东仓库=花岗岩,1号,东仓库需要在材料表里获取关于花岗岩,1号的数据 If e.DataCol.Name = "材料表" Then Dim nms() As String = {"日期","库类""形态","品类""性质","供应商或生产方""领用人","车牌号","车辆数""规格","运输起点""运输终点","运输距离""计量规格","计量单位","数量""单价","金额"} If e.NewValue Is Nothing Then For Each nm As String In nms e.DataRow(nm) = Nothing Next Else Dim dr As DataRow dr = DataTables("花岗岩").Find("[1号] = \'" & e.NewValue & "\'") If dr IsNot Nothing For Each nm As String In nms e.DataRow(nm) = dr(nm) Next End If End If End If |
||||
-- 作者:有点蓝 -- 发布时间:2020/12/28 11:24:00 -- If e.DataCol.Name = "材料表" Then Dim nms() As String = {"日期","库类""形态","品类""性质","供应商或生产方""领用人","车牌号","车辆数""规格","运输起点""运输终点","运输距离""计量规格","计量单位","数量""单价","金额"} If e.NewValue Is Nothing Then For Each nm As String In nms e.DataRow(nm) = Nothing Next Else Dim dr As DataRow dr = DataTables("花岗岩").Find("[1号] = \'" & e.NewValue & "\'") If dr IsNot Nothing For Each nm As String In nms e.DataRow(nm) = dr(nm) Next End If End If End If 如果还有问题,说明不存在符合条件的数据
|
||||
-- 作者:lzxi -- 发布时间:2020/12/30 18:16:00 -- 老师,你是不是没写全,和我上传的一模一样 |
||||
-- 作者:有点蓝 -- 发布时间:2020/12/31 8:38:00 -- 说明不存在符合条件的数据,具体请上传实例说明 |
||||
-- 作者:lzxi -- 发布时间:2021/1/1 18:39:00 -- 希望能实现总表记录,相对应的子库分品种与型号同步记录
|
||||
-- 作者:有点蓝 -- 发布时间:2021/1/3 9:59:00 -- 完全看不懂这些表和代码的关系,请手工填写举例说明一下:哪个表填入什么数据,其它表相应增加什么数据? |