Foxtable(狐表)用户栏目专家坐堂 → 又出现错误框框了~!


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

主题:又出现错误框框了~!

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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/4/21 16:46:00 [显示全部帖子]

Select Case e.DataCol.Name
    Case "产品编号","等级","色号","入库","出库"
        Dim dr As DataRow
        Dim mr As DataRow = e.DataRow
        Dim drs As List(of DataRow)
        dr = e.DataTable.Find("[_SortKey] < " & mr("_SortKey") & " And [产品编号] = '" & mr("产品编号") & "'And [等级] = '" & mr("等级") & "'And [色号] = " & mr("色号") , "[_SortKey] Desc")
        If dr Is Nothing Then
            mr("库存") = mr("入库") - mr("出库")
            dr = mr
        End If
        drs = e.DataTable.Select("[_SortKey] >= " & dr("_SortKey") & " And [产品编号] = '" & mr("产品编号") & "'And [等级] = '" & mr("等级") & "'And [色号] = " & mr("色号") , "[_SortKey]")
        For i As Integer = 1 To drs.Count - 1
            drs(i)("库存") = drs(i-1)("库存") + drs(i)("入库") - drs(i)("出库")
        Next
End Select

 

注意色号是整数型,表达式是不能用单引号的,请参考:

http://help.foxtable.com/topics/1284.htm

 

[此贴子已经被作者于2011-4-21 16:59:11编辑过]

 回到顶部