Dim Vals As List(of String()) Vals = DataTables("考勤").GetValues("合同编号|员工编号|考勤月份","审核 is null") For i As Integer = 0 To Vals.Count - 1 Dim tr As DataRow = DataTables("工资发放").Find("合同编号 = '" & Vals(i)(0) & "' And 员工编号 = '" & Vals(i)(1) & "' And 考勤月份 = #" & Vals(i)(2) & "#") If tr Is Nothing Then Dim dr As DataRow = DataTables("工资发放").AddNew() dr("合同编号") = Vals(i)(0) dr("员工编号") = Vals(i)(1) dr("考勤月份") = Vals(i)(2) End If Next
|