以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  多值字段问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=124833)

--  作者:13775189031
--  发布时间:2018/9/14 14:03:00
--  多值字段问题
Dim ary1() As String = {"外购","锻件","铸件","下料","壳体制作","机加工","镀层","零件表面无损探伤","组合焊接","标识","热处理","焊接件无损探伤","部件机加工","试装配","固溶","酸洗","装配","内部水压试验","喷砂油漆","打包装箱"}
Dim ary2() As String = {"外购","锻件","铸件","下料","壳体制作","机加工","镀层","零件表面无损探伤","组合焊接","标识","热处理","焊接件无损探伤","部件机加工","试装配","固溶","酸洗","装配","内部水压试验","喷砂油漆","打包装箱"}
If e.DataCol.Name = "工序流程" Then
    Dim str As String = e.DataRow("工序流程")
    Dim ary3 = str.split("|")
    For i As Integer = 0 To ary1.length-1
        Dim idx As Integer = array.indexof(ary3, ary1(i))
        If idx >= 0 Then
            Tables("零部件清单").current(ary2(i)) = True
        Else
            Tables("零部件清单").current(ary2(i)) = False
        End If
    Next
Else
End If


工序流程”列为多值字段,点选打勾的话,上述编码没问题,
但是,多行“工序流程”内容相同时,用重复填充列,“工序流程”列中内容显示,但逻辑列中不显示,是什么问题?

--  作者:有点甜
--  发布时间:2018/9/14 14:27:00
--  

改成

 

Dim ary1() As String = {"外购","锻件","铸件","下料","壳体制作","机加工","镀层","零件表面无损探伤","组合焊接","标识","热处理","焊接件无损探伤","部件机加工","试装配","固溶","酸洗","装配","内部水压试验","喷砂油漆","打包装箱"}
Dim ary2() As String = {"外购","锻件","铸件","下料","壳体制作","机加工","镀层","零件表面无损探伤","组合焊接","标识","热处理","焊接件无损探伤","部件机加工","试装配","固溶","酸洗","装配","内部水压试验","喷砂油漆","打包装箱"}
If e.DataCol.Name = "工序流程" Then
    Dim str As String = e.DataRow("工序流程")
    Dim ary3 = str.split("|")
    For i As Integer = 0 To ary1.length-1
        Dim idx As Integer = array.indexof(ary3, ary1(i))
        If idx >= 0 Then
            e.DataRow(ary2(i)) = True
        Else
            e.DataRow(ary2(i)) = False
        End If
    Next
End If


--  作者:13775189031
--  发布时间:2018/9/15 8:52:00
--  
ok!谢谢!