Foxtable(狐表)用户栏目专家坐堂 → [求助]


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

主题:[求助]

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


加好友 发短信
等级:一尾狐 帖子:496 积分:4881 威望:0 精华:0 注册:2012/4/20 8:42:00
  发帖心情 Post By:2012/8/16 20:12:00 [显示全部帖子]

看了一下你的这个系统,和你说一下我的思路啊,

你是按照物料编码对应单独的物料的,所以呢,可以把物料编码作为独立的键查找。

我用描述性的语言写这个代码:

可以在jm12001表的datachanged事件中设置:

dim dr as datarow

select case datacol.name

    case "数量" '数量发生变化时,进行下面的操作

        if e.datarow("代码") > "" and e.datarow("数量") > "" then

          dr=datatables("产品").find("[代码] = '" & e.datarow("代码") & "'")

          if dr isnot nothing then

              Dim wz As Integer = Tables("产品").FindRow(dr)
                  If
wz >= 0 Then
                  Tables
("产品").Position = wz
             End If

          tables("产品").current("数量") = tables("产品").current("数量") - e.datarow("数量")

        end if
        end if

end select


 回到顶部