Foxtable(狐表)用户栏目专家坐堂 → [求助]


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

主题:[求助]

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/6/8 12:12:00 [显示全部帖子]

Select Case e.DataCol.Name
    Case "A","B"
        If e.DataRow.IsNull("A") OrElse e.DataRow.IsNull("B") Then
            e.DataRow("C")=Nothing
e.DataRow("D")=Nothing
        ElseIf e.DataRow("B") ="甲" Then
            Dim de As DataRow = e.DataRow
            Dim pe As DataRow = DataTables("表2").Find("A= '" & de("A") & "'")
            If pe IsNot Nothing Then
                de("C") = pe("M")
                de("D") = pe("N")
            End If
        ElseIf e.DataRow("B") ="乙" Then
            Dim de As DataRow = e.DataRow
            Dim pe As DataRow = DataTables("表3").Find("A= '" & de("A") & "'")
            If pe IsNot Nothing Then
                de("C") = pe(("M"))
                de("D") = pe("N")
            End If
        ElseIf e.DataRow("B") ="丙" Then
            Dim de As DataRow = e.DataRow
            Dim pe As DataRow = DataTables("表4").Find("A= '" & de("A") & "'")
            If pe IsNot Nothing Then
                de("C") = pe(("M"))
                de("D") = pe("N")
            End If
        End If
End Select

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/6/8 19:16:00 [显示全部帖子]

Select Case e.DataCol.Name
    Case "A","B"
        If e.DataRow.IsNull("A") OrElse e.DataRow.IsNull("B") Then
            e.DataRow("C")=Nothing
            e.DataRow("D")=Nothing
        Else
            Dim de As DataRow = e.DataRow
            Dim pe As DataRow = DataTables("表2").Find("A= '" & de("A") & "'")
            If pe IsNot Nothing Then
                If e.DataRow("B") ="甲" Then
                    de("C") = pe("M")
                    de("D") = pe("N")
                ElseIf e.DataRow("B") ="乙" Then
                    de("C") = pe(("M"))
                    de("D") = pe("N")
                ElseIf e.DataRow("B") ="丙" Then
                    de("C") = pe(("M"))
                    de("D") = pe("N")
                End If
            End If
        End If
End Select

 回到顶部