Foxtable(狐表)用户栏目专家坐堂 → 多个参数写入不同的列 求助


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

主题:多个参数写入不同的列 求助

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


加好友 发短信
等级:九尾狐 帖子:2482 积分:22932 威望:0 精华:0 注册:2011/3/29 17:14:00
多个参数写入不同的列 求助  发帖心情 Post By:2022/4/13 17:38:00 [只看该作者]

  Dim dr As DataRow = DataTables("系统_数据模块").SQLFind("模块名称='" & e.Sender.Name & "'")      
        If dr IsNot Nothing Then '如果找到的话
            Dim Value As String = dr("参数_A")
            Dim Value1 As String = dr("参数_B")
            Dim Value2 As String = dr("参数_C")
            Dim sps() As Char = {"|"}
            Dim Names() As String  = Value.Split(sps)
            For Each Name As String In Names
                Dim ndr As Row = Tables("订单_产品清单").AddNew
                ndr("产品_分类") = e.Sender.Name
                ndr("产品_构件名称") = Name                
            Next
        End If 


和下面的代码结果一样

'Dim dr As DataRow = DataTables("系统_数据模块").SQLFind("模板名称='" & e.Sender.Name & "'")
'If dr IsNot Nothing Then '如果找到的话
'Dim str() As String = {"产品效果","服务清单","价格确定","正式订单签约","深化复尺","制造下单","现场保护","微改交底","进场施工"}
'Dim sjd() As String = {"1","2","3","7","5","20","10","10","8"}
'Dim sjb() As String = {"业主|设计","业务|设计|业主","业务|设计|业主","业主|业务","设计|设计主管","设计|跟单|财务","项目经理|业务","项目经理|设计|微改部门","微改|业务|设计"}
'For i As Integer = 0 To 8
'Dim r As Row = Tables("项目进度").AddNew
'r("项目名称") = str(i)
'r("进度_执行天数") = sjd(i)
'r("团队_组员") = sjb(i)
'
'Next

     

[此贴子已经被作者于2022/4/13 17:39:35编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111414 积分:567140 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/4/14 8:33:00 [只看该作者]

照样套咯

            Dim Names() As String  = Value.Split(sps)
            Dim Names1() As String  = Value1.Split(sps)
            For i as integer = 0 to Names.length - 1
                Dim ndr As Row = Tables("订单_产品清单").AddNew
                ndr("产品_分类") = e.Sender.Name
                ndr("产品_构件名称") = Names(i) 
                ndr("xx列") = Names1(i) 
            Next
        End If 

 回到顶部