Foxtable(狐表)用户栏目专家坐堂 → 赋值无效


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

主题:赋值无效

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


加好友 发短信
等级:六尾狐 帖子:1310 积分:9518 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2020/9/15 17:03:00 [显示全部帖子]

For Each dr As DataRow In DataTables("R06_CheckMaterialAmount_Detail").DataRows
    dr = DataTables("R06_CheckMaterialAmount_Detail").Find("outboundQuantity >0  and outboundWagePrice is null")

 

 

第一行循环了得到DR的变量,第二行又给DR再赋值,看不懂第一行循环的作用在那里?


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


加好友 发短信
等级:六尾狐 帖子:1310 积分:9518 威望:0 精华:0 注册:2015/6/30 8:46:00
  发帖心情 Post By:2020/9/15 17:05:00 [显示全部帖子]

For Each dr As DataRow In DataTables("R06_CheckMaterialAmount_Detail").Select("outboundQuantity >0  and outboundWagePrice is null")
   ' dr = DataTables("R06_CheckMaterialAmount_Detail").Find("outboundQuantity >0  and outboundWagePrice is null") 删除这行
    If dr IsNot Nothing Then '如果找到符合条件的
        Dim dr1 As DataRow
        dr1 = DataTables("R06_CheckMaterialAmount_Detail").Find("(tableCode='R03_InboundProducts' Or tableCode='R03_Delegation') And (itemID = '" & dr("itemID") & "') and (number> '"&dr("number")&"')","number",0)
        If dr1 IsNot Nothing Then '如果找到符合条件的
            dr("outboundWagePrice")=dr1("inboundWagePrice")
            dr.save
        End If
    End If
Next
是不是这才是你想要的效果!

 回到顶部