Foxtable(狐表)用户栏目专家坐堂 → [求助]关于从后台表a提取部分字段数据填充到当前表的问题


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

主题:[求助]关于从后台表a提取部分字段数据填充到当前表的问题

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/31 15:51:00 [显示全部帖子]

Dim isbn As WinForm.TextBox = e.Form.Controls("isbn")
Dim Cols1() As String = {"正题名","副题名","丛编题名","编著者","出版社名","出版时间","开本","价格"}
Dim Cols2() As String = {"正题名","副题名","丛编题名","编著者","出版社名","出版时间","开本","价格"}
For Each dr1 As DataRow In DataTables("书目").Select("[isbn] = isbn.value")
    Dim dr2 As Row = Tables("淮河路书库").Current
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Next

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/12/31 16:19:00 [显示全部帖子]

Dim isbn As WinForm.TextBox = e.Form.Controls("isbn")
Dim Cols1() As String = {"isbn","正题名","副题名","丛编题名","编著者","出版社名","出版时间","开本","价格"}
Dim Cols2() As String = {"isbn","正题名","副题名","丛编题名","编著者","出版社名","出版时间","开本","价格"}
Dim dr1 As DataRow = DataTables("书目").Find("[isbn] = '" & isbn.value & "'")
Dim dr2 As Row = Tables("淮河路书库").Current
If dr1 IsNot Nothing Then
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
End If

 回到顶部