以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 引用求和 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=140051) |
-- 作者:有点蓝 -- 发布时间:2019/8/28 15:47:00 -- 引用其它表的数据使用find查询即可,这个都还不会? |
-- 作者:有点蓝 -- 发布时间:2019/8/28 16:04:00 -- 参考:http://www.foxtable.com/webhelp/topics/0696.htm |
-- 作者:有点蓝 -- 发布时间:2019/8/29 9:39:00 -- Dim dr As DataRow = e.DataRow Select Case e.DataCol.Name Case "数量","加工工序","成品编码" If dr("数量") = 0 OrElse dr.IsNull("加工工序") OrElse dr.IsNull("成品编码") Then dr("金额") = Nothing Else Dim filter As String filter = "成品编码= \'" & dr("成品编码") & "\' And 加工工序 = \'" & dr("加工工序") & "\'" Dim pr = DataTables("成品库存表").SQLFind(filter) If pr IsNot Nothing Then dr("金额") = dr("数量") * pr("单价") Else dr("金额") = Nothing End If End If End Select
|