Foxtable(狐表)用户栏目专家坐堂 → 求助 工序价格参照表如何编写代码


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

主题:求助 工序价格参照表如何编写代码

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/2/10 23:10:00 [显示全部帖子]

 用下面的代码,写到datacolchanged事件里去

Select Case e.DataCol.Name
    Case "工序", "型号", "物品", "尺寸"
        If e.DataRow.IsNull("工序") = False AndAlso e.DataRow.IsNull("型号") = False AndAlso e.DataRow.IsNull("物品") = False AndAlso e.DataRow.IsNull("尺寸") = False Then
            Dim fdr As DataRow = DataTables("工序").Find("工序 = '" & e.DataRow("工序") & "' and 型号 = '" & e.DataRow("型号") & "' and 物品 = '" & e.DataRow("物品") & "' and 尺寸 = '" & e.DataRow("尺寸") & "'")
            If fdr IsNot Nothing Then
                e.DataRow("工价") = fdr("工价")
            End If
        End If
End Select

 回到顶部