Foxtable(狐表)用户栏目专家坐堂 → 多个字段 多列值填充 如何有效对应


  共有2799人关注过本帖平板打印复制链接

主题:多个字段 多列值填充 如何有效对应

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


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
多个字段 多列值填充 如何有效对应  发帖心情 Post By:2021/11/9 9:53:00 [只看该作者]

当前代码如下:
Dim t1 As WinForm.TextBox = e.Form.Controls("TextBox7")
Dim tt1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim tt2 As WinForm.ComboBox = e.Form.Controls("ComboBox4")
Dim tt3 As WinForm.ComboBox = e.Form.Controls("ComboBox15")
Dim Products As List(Of String)
Products = DataTables("词典表").GetValues("值","类别='球镜'")
Dim Products1 As List(Of String)
Products1 = DataTables("词典表").GetValues("值","类别='柱镜'")
For Each Product As String In Products
    Dim dr As Row = Tables("镜片物料").AddNew()
    dr("初始库存")=0
    dr("品牌")=tt1.Text
    dr("特性")=tt2.Text
    dr("规格")=tt3.Text
    dr("球镜")=Product
    For Each Product1 As String In Products1
        dr("柱镜")=Product1
    Next
    dr.Save
Next

运行效果如下:
图片点击可在新窗口打开查看

想实现球镜ABC三个规格  柱镜 123 三个规格
生成数据如下:
A  1
A  2
A  3
B  1
B  2
B  3
C  1
C  2
C  3
图上数据只有
A  1
B  1
C  1

麻烦老师修正一下  谢谢!

 回到顶部