Tables("表b").StopRedraw
For Each dir As String In FileSys.GetDirectories(dlg.SelectedPath)
For Each f As String In FileSys.GetFiles(dir)
If DataTables("表B").Find("文件名 = '" & f & "'") Is Nothing Then
If f.EndsWith("_verifysign.log") Then
Dim txt As String = FileSys.ReadAllText(f, Encoding.Default)
Dim idx As Integer = txt.LastIndexOf("</business>")
Dim s1 As String = txt.SubString(0, idx+11)
Dim s2 As String = txt.SubString(idx+12)
Dim xmlDoc As New System.XML.XmlDocument
xmlDoc.Loadxml(s1)
Dim ndList = xmlDoc.GetElementsByTagName("input")
Dim kprq As String
Dim fphm As String
Dim ghdwmc As String
Dim ghdwdzdh As String
Dim ghdwsbh As String
Dim ghdwyhzh As String
Dim hjje As String
Dim hjse As String
Dim jshj As String
Dim fpzt As String
For i As Integer = 0 To ndList.count - 1
If ndList(i).Item("kprq") IsNot Nothing Then kprq = ndList(i).Item("kprq").InnerText
If ndList(i).Item("fphm") IsNot Nothing Then fphm = ndList(i).Item("fphm").InnerText
If ndList(i).Item("ghdwmc") IsNot Nothing Then ghdwmc = ndList(i).Item("ghdwmc").InnerText
If ndList(i).Item("ghdwdzdh") IsNot Nothing Then ghdwdzdh = ndList(i).Item("ghdwdzdh").InnerText
If ndList(i).Item("ghdwsbh") IsNot Nothing Then ghdwsbh = ndList(i).Item("ghdwsbh").InnerText
If ndList(i).Item("ghdwyhzh") IsNot Nothing Then ghdwyhzh = ndList(i).Item("ghdwyhzh").InnerText
If ndList(i).Item("hjje") IsNot Nothing Then hjje = ndList(i).Item("hjje").InnerText
If ndList(i).Item("hjse") IsNot Nothing Then hjse = ndList(i).Item("hjse").InnerText
If ndList(i).Item("jshj") IsNot Nothing Then jshj = ndList(i).Item("jshj").InnerText
If ndList(i).Item("fpzt") IsNot Nothing Then fpzt = ndList(i).Item("fpzt").InnerText
ndList = xmlDoc.GetElementsByTagName("fyxm")(0).ChildNodes
Dim r As Row = Tables("表b").AddNew
r("第一列") = kprq
r("第二列") = fphm
r("第三列") =ghdwmc
r("第四列") =ghdwdzdh
r("第五列") = ghdwsbh
r("第六列") = ghdwyhzh
r("第七列") = hjje
r("第八列") = hjse
r("第九列") = jshj
r("第十列") = fpzt
r("文件名") = f
Next
End If
End If
Next
Next
Tables("表b").ResumeRedraw
MessageBox.Show("fa piao导入完成")
End If
For Each s As String In DataTables("表A").GetValues("第一列", "第九列 = '3'")
DataTables("表A").DeleteFor("第一列 = '" & s & "' and 第九列 = '0'")
Next
DataTables("表b").DeleteFor(" 第十列 = '2'")
For Each s1 As String In DataTables("表B").GetValues("第二列", "第十列 = '3'")
DataTables("表B").DeleteFor("第二列 = '" & s1 & "' and 第十列 = '0'")
Next
If DataTables("表A").HasChanges Then
DataTables("表A").Save
End If
If DataTables("表B").HasChanges Then
DataTables("表B").Save
End If