Foxtable(狐表)用户栏目专家坐堂 → 代码修正,运行错误,无法达到指定运行项目!


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

主题:代码修正,运行错误,无法达到指定运行项目!

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


加好友 发短信
等级:九尾狐 帖子:2472 积分:17346 威望:0 精华:0 注册:2013/1/31 0:03:00
代码修正,运行错误,无法达到指定运行项目!  发帖心情 Post By:2019/3/15 14:49:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:66.png
图片点击可在新窗口打开查看

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:信息自动化 - 副本.foxdb


代码如下:(运行后永远只显示第一条  我是承办人  连弹三次,正确的应该是我是承办人  我是检察官助理  我是书记员)
If Tables.Contains("干警信息") Then
    For Each r As Row In Tables("干警信息").Rows
        If r("姓名") IsNot Nothing Then
            Dim drs = DataTables("告知内容").Select("姓名 = '" & r("姓名") & "' and (是否告知 is null or 是否告知 <> '是')")
            If drs.count = 0 Then
                r.Checked = False
            Else
                r.checked = True
            End If
        End If
    Next
End If

Dim rs As List(of Row) = Tables("干警信息").GetCheckedRows
If rs.Count > 0 Then
    Dim dr1 As DataRow
    dr1 = DataTables("告知内容").Find("是否告知 = '否' " )
    If dr1 IsNot Nothing Then
        Dim tbl As Table = Tables("干警信息")
        For Each rw As Row In tbl.GetCheckedRows
            If dr1("人员类型")="案件承办人" Then
                MessageBox.Show("我是案件承办人")
                If rw("电话号码") <> Nothing Then
                End If
                If rw("电子邮件") <> Nothing Then
                End If
            End If
            If dr1("人员类型")="检察官助理" Then
                MessageBox.Show("我是检察官助理")
                If rw("电话号码") <> Nothing Then
                End If
                If rw("电子邮件") <> Nothing Then
                End If
            End If
            If dr1("人员类型")="书记员" Then
                MessageBox.Show("我是书记员")
                If rw("电话号码") <> Nothing Then
                End If
                If rw("电子邮件") <> Nothing Then
                End If
            End If
            If dr1("人员类型")="关联人" Then
                MessageBox.Show("我是检察官主力")
                If rw("电话号码") <> Nothing Then
                End If
                If rw("电子邮件") <> Nothing Then
                End If
            End If
        Next
    End If



Else
    MessageBox.Show("当前信息已经全部告知!","【温馨提示】")
End If

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/3/15 15:58:00 [只看该作者]

If Tables.Contains("干警信息") Then
    For Each r As Row In Tables("干警信息").Rows
        If r("姓名") IsNot Nothing Then
            Dim drs = DataTables("告知内容").Select("姓名 = '" & r("姓名") & "' and (是否告知 is null or 是否告知 <> '是')")
            If drs.count = 0 Then
                r.Checked = False
            Else
                For Each dr1 As DataRow In drs
                    If dr1("人员类型")="案件承办人" Then
                        MessageBox.Show("我是案件承办人")
                        If r("电话号码") <> Nothing Then
                        End If
                        If r("电子邮件") <> Nothing Then
                        End If
                    End If
                    If dr1("人员类型")="检察官助理" Then
                        MessageBox.Show("我是检察官助理")
                        If r("电话号码") <> Nothing Then
                        End If
                        If r("电子邮件") <> Nothing Then
                        End If
                    End If
                    If dr1("人员类型")="书记员" Then
                        MessageBox.Show("我是书记员")
                        If r("电话号码") <> Nothing Then
                        End If
                        If r("电子邮件") <> Nothing Then
                        End If
                    End If
                    If dr1("人员类型")="关联人" Then
                        MessageBox.Show("我是检察官主力")
                        If r("电话号码") <> Nothing Then
                        End If
                        If r("电子邮件") <> Nothing Then
                        End If
                    End If
                Next
            End If
        End If
    Next
End If
Dim rs As List(of Row) = Tables("干警信息").GetCheckedRows
If rs.Count = 0 Then
    MessageBox.Show("当前信息已经全部告知!","【温馨提示】")
End If

 回到顶部