Foxtable(狐表)用户栏目专家坐堂 → [求助]


  共有2297人关注过本帖树形打印复制链接

主题:[求助]

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/4/6 20:50:00 [显示全部帖子]

If msgbox("网银数据导入可以更新已开通业务,是否进行导入?",65,"提示") = 1 Then
    Dim Book As New XLS.Book("D:\khdaxt\drgx\wsyh.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 & "'")
        If dr Is Nothing Then
            dr = DataTables("对公客户明细").AddNew
           
        End If
        For m As Integer = 0 To nms.Length - 1
            dr(nms(m)) = trim(Sheet(n,m).Value)
        Next
        dr("已开通业务") = (dr("已开通业务") & "," & trim(Sheet(n,1).Value)).Trim(",")
    Next
    Tables("对公客户明细").ResumeRedraw()
    msgbox("网银数据导入完毕!",64,"提示")
End If

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/4/6 21:52:00 [显示全部帖子]

If msgbox("网银数据导入可以更新已开通业务,是否进行导入?",65,"提示") = 1 Then
    Dim Book As New XLS.Book("D:\khdaxt\drgx\wsyh.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 & "'")
        '        If dr Is Nothing Then
        '            dr = DataTables("对公客户明细").AddNew
        '        End If
        For m As Integer = 0 To nms.Length - 1
            dr(nms(m)) = trim(Sheet(n,m).Value)
        Next
        Dim s As String = trim(Sheet(n,1).Value)
        If dr("已开通业务").Contains(s) = False
            dr("已开通业务") = (dr("已开通业务") & "," & s).Trim(",")
        End If
    Next
    Tables("对公客户明细").ResumeRedraw()
    msgbox("网银数据导入完毕!",64,"提示")
End If

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/4/6 22:28:00 [显示全部帖子]

If msgbox("网银数据导入可以更新已开通业务,是否进行导入?",65,"提示") = 1 Then
    Dim Book As New XLS.Book("D:\khdaxt\drgx\wsyh.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 & "'")
        If dr IsNot Nothing Then
           
            For m As Integer = 0 To nms.Length - 1
                dr(nms(m)) = trim(Sheet(n,m).Value)
            Next
            Dim s As String = trim(Sheet(n,1).Value)
            If dr("已开通业务").Contains(s) = False
                dr("已开通业务") = (dr("已开通业务") & "," & s).Trim(",")
            End If
        End If
    Next
    Tables("对公客户明细").ResumeRedraw()
    msgbox("网银数据导入完毕!",64,"提示")
End If

 回到顶部