甜老师,我这样写,会出现这种错行的情况,要怎么处理呢。。
此主题相关图片如下:微信截图_20190103220203.png
Dim nms() As String = {"order_id","page_id","trans_id","create_time","pay_finish_time","total_price","open_id","accepter_openid","outer_str","IsChatRoom","background_pic_url","nickname"} '列名Dim nms1() As String = {"card_id","price","code","default_gifting_msg","background_pic_url","accepter_openid"}
If jo1("errcode") = "0" Then
Dim ia As JArray = jo1("order_list") '获取的用户信息列表
For Each jt As JToken In ia
Dim dr As DataRow = DataTables("微信礼品卡订单信息").Find("order_id = '" & jt("order_id").ToString() & "'")
If dr Is Nothing Then
dr = DataTables("微信礼品卡订单信息").AddNew()
For Each nm As String In nms
dr(nm) = jt(nm)
Next
Dim ia1 As JArray = jt("card_list") '获取的用户信息列表
For Each jt1 As JToken In ia1
Dim dr1 As DataRow = DataTables("微信礼品卡订单信息").Find("code = '" & jt1("code").ToString() & "' and card_id = '" & jt1("card_id").ToString() & "' ")
If dr1 Is Nothing Then
dr1 = DataTables("微信礼品卡订单信息").AddNew()
For Each nm1 As String In nms1
dr1(nm1) = jt1(nm1)
Next
End If
Next
End If
Next
Else
output.show("1:" & jo1.ToString)
End If