DataTables("协审查询结果").DataRows.Clear()
Dim dt1 As DataTable = DataTables("基本信息")
Dim dt2 As DataTable = DataTables("线索数据")
Dim dt3 As DataTable = DataTables("案件数据")
Dim dt4 As DataTable = DataTables("协审查询结果")
Dim i As Integer = 0
For Each dr1 As DataRow In dt1.DataRows
Dim xm As String = dr1("姓名").trim()
Dim drs2 As List(Of DataRow)
drs2 = dt2.Select("被调查人 = '" & xm & "'")
For Each dr2 As DataRow In drs2
Dim dr4 As DataRow = dt4.AddNew()
dr4("姓名") = dr2("被调查人")
dr4("身份证号码") = ""
dr4("现单位") = dr1("单位")
dr4("处理类型") = dr2("组织措施")
dr4("处理事由") = dr2("简要案情")
dr4("处理时间") = dr2("处理时间")
dr4("时任单位职务") = dr2("工作单位及职务")
dr4("备注") = ""
Dim cllx As String = dr2("组织措施")
If cllx.Contains("诫勉") Then
If Not dr2.IsNull("处理时间") Then
dr4("影响时限") = dr2("处理时间").AddMonths(6)
End If
Else
If Not dr2.IsNull("处理时间") Then
dr4("影响时限") = dr2("处理时间")
End If
End If
Next
Dim drs3 As List(Of DataRow)
drs3 = dt3.Select("被调查人 = '" & xm & "'")
For Each dr3 As DataRow In drs3
Dim dr4 As DataRow = dt4.AddNew()
dr4("姓名") = dr3("被调查人")
dr4("身份证号码") = ""
dr4("现单位") = dr1("单位")
dr4("处理类型") = dr3("党纪处分") + "*" + dr3("政纪处分")
dr4("处理事由") = dr3("简要案情")
dr4("处理时间") = dr3("结案时间")
dr4("影响时限") = ""
dr4("时任单位职务") = dr3("工作单位及职务")
dr4("备注") = ""
Dim djcf As String = dr3("党纪处分")
If djcf.Contains("开除党籍") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(480)
End If
ElseIf djcf.Contains("留党察看") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(48)
End If
ElseIf djcf.Contains("撤消党内职务") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(24)
End If
ElseIf djcf.Contains("严重警告") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(18)
End If
ElseIf djcf.Contains("警告") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(12)
End If
ElseIf djcf.Contains("延长预备期一年") Then
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间").AddMonths(12)
End If
Else
If Not dr3.IsNull("结案时间") Then
dr4("影响时限") = dr3("结案时间")
End If
End If
Next
Next