以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  代码修正,运行错误,无法达到指定运行项目!  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132172)

--  作者:李孝春
--  发布时间: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

--  作者:有点甜
--  发布时间: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