Foxtable(狐表)用户栏目专家坐堂 → 扫条码提取信息


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

主题:扫条码提取信息

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


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2016/3/23 17:35:00 [显示全部帖子]

If e.DataCol.Name = "条形码" Then
    If e.newvalue.length >= 32 Then
        e.DataRow("账户编号") = e.newvalue.substring(6, 9)
        e.DataRow("账期") = e.newvalue.substring(15, 4)
        e.DataRow("金额") = e.newvalue.substring(24, 8)
    Else
        e.DataRow("账户编号") = Nothing
        e.DataRow("账期") = Nothing
        e.DataRow("金额") = Nothing
    End If
End If

If e.DataCol.name = "账户编号" Then
    Dim fdr As DataRow = DataTables("客户信息").find("账户编号 = '" & e.newvalue & "'")
    If fdr Is Nothing Then
        e.DataRow("公司名字") = Nothing
        e.DataRow("业务种类") = Nothing
    Else
        e.DataRow("公司名字") = fdr("公司名字")
        e.DataRow("业务种类") = fdr("业务种类")
    End If
End If


 回到顶部