以文本方式查看主题

-  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=75440)

--  作者:liuyixin662
--  发布时间:2015/10/8 16:32:00
--  订单表-价格列代码
怎样从价格表中引用单价
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:订单表-单价.zip


--  作者:大红袍
--  发布时间:2015/10/8 16:44:00
--  

DataColChanged事件

 

Select Case e.DataCol.Name
    Case "价格日期","价格方式"
        If e.DataRow.IsNull("价格日期") OrElse e.DataRow.isnull("价格方式") Then
            e.DataRow("单价") = Nothing
        Else
            If DataTables("价格表").DataCols.Contains(e.DataRow("价格方式")) Then
                Dim fdr As DataRow = DataTables("价格表").Find("价格日期 = \'" & e.DataRow("价格日期") & "\'")
                If fdr IsNot Nothing Then
                    e.DataRow("单价") = fdr(e.DataRow("价格方式"))
                End If
            End If
        End If
End Select


--  作者:liuyixin662
--  发布时间:2015/10/8 17:07:00
--  
谢谢,终于明白了