Foxtable(狐表)用户栏目专家坐堂 → [求助]datachanged代码部分没运行


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

主题:[求助]datachanged代码部分没运行

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


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


Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
    Case "快递详单"
        dr("快递详情") = ""
        Dim jo As JObject = Jobject.Parse(dr("快递详单"))
        Dim ja As JArray = Jarray.Parse(("traces"))
        If ja.count > 0 Then
            For Each jt As JToken In jo("traces")
                dr("快递详情") = dr("快递详情") & (jt("acceptTime").ToString & " | " & jt("acceptAddress").ToString & " | " & jt("remark").ToString) & vbcrlf
            Next
        Else
            dr("快递详情") = "过期或无此订单"
        End If
       
End Select

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


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

实例发上来测试。

 

Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
    Case "快递详单"
        If dr("快递详单") > "" Then
            dr("快递详情") = ""
            Dim jo As JObject = Jobject.Parse(dr("快递详单"))
            Dim ja As JArray = Jarray.Parse(("traces"))
            If ja.count > 0 Then
                For Each jt As JToken In jo("traces")
                    dr("快递详情") = dr("快递详情") & (jt("acceptTime").ToString & " | " & jt("acceptAddress").ToString & " | " & jt("remark").ToString) & vbcrlf
                Next
            Else
                dr("快递详情") = "过期或无此订单"
            End If
        End If
End Select


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


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


Dim dr As DataRow = e.DataRow
Select Case e.DataCol.Name
    Case "快递详单"
        If dr("快递详单") > "" Then
            Dim jo As JObject = Jobject.Parse(dr("快递详单"))
            Dim ja As JArray = jo("traces")
            Dim str = ""
            If ja.count > 0 Then
                For Each jt As JToken In jo("traces")
                    str &= (jt("acceptTime").ToString & " | " & jt("acceptAddress").ToString & " | " & jt("remark").ToString) & vbcrlf
                Next
                dr("快递详情") = str
            Else
                dr("快递详情") = "过期或无此订单"
            End If
        End If
End Select

 回到顶部