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


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

主题:[求助] 自动输入

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


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

datacolchanged事件

 

Dim cs() As String = {"收取", "摆放"}

If array.IndexOf(cs, e.DataCol.Name) > -1 Then
    If e.NewValue = True Then
        Dim fdr As DataRow = DataTables("表B").Find("型号 = '" & e.DataRow("型号") & "'")
        If fdr IsNot Nothing Then
            e.DataRow("能力") = fdr(e.DataCol.Name)
        Else
            e.DataRow("能力") = Nothing
        End If
    Else
        Dim cname As String = ""
        For Each c As String In cs
            If e.DataRow(c) = True Then
                cname = c
                Exit For
            End If
        Next
        If cname = "" Then
            e.DataRow("能力") = Nothing
        Else
            Dim fdr As DataRow = DataTables("表B").Find("型号 = '" & e.DataRow("型号") & "'")
            If fdr IsNot Nothing Then
                e.DataRow("能力") = fdr(cname)
            Else
                e.DataRow("能力") = Nothing
            End If
        End If
       
    End If
Else If e.DataCol.Name = "型号" Then
    Dim cname As String = ""
    For Each c As String In cs
        If e.DataRow(c) = True Then
            cname = c
            Exit For
        End If
    Next
    If cname = "" Then
        e.DataRow("能力") = Nothing
    Else
        Dim fdr As DataRow = DataTables("表B").Find("型号 = '" & e.DataRow("型号") & "'")
        If fdr IsNot Nothing Then
            e.DataRow("能力") = fdr(cname)
        Else
            e.DataRow("能力") = Nothing
        End If
    End If
End If


 回到顶部