If User.IsRole("对公专区") Then '审核代码 If msgbox("对账数据导入会覆盖已更新的联系人信息,是否进行导入?",65,"提示") = 1 Then Dim Book As New XLS.Book("D:\khdaxt\drgx\dz.xls") Dim Sheet As XLS.Sheet = Book.Sheets(0) Tables("对公客户明细").StopRedraw() Dim nms() As String = {"账号","户名","联系人","座机","手机","地址"} For n As Integer = 0 To Sheet.Rows.Count -1 Dim bh As String = sheet(n,0).Text Dim dr As DataRow = DataTables("对公客户明细").Find("账号 = '" & bh & "' and 联系人 is null") If dr IsNot Nothing Then For m As Integer = 0 To nms.Length -1 dr(nms(m)) = trim(Sheet(n,m).Value) Next End If Next Tables("对公客户明细").ResumeRedraw() msgbox("对账数据导入完毕!",64,"提示") End If Else MessageBox.Show("您无此权限!") End If
|