Foxtable(狐表)用户栏目专家坐堂 → 自动加减数量的问题


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

主题:自动加减数量的问题

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


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

If Tables("盈亏对账主窗口_Table2").Rows.Count>0 Then
    If Tables("盈亏对账主窗口_Table2").Current.IsNull("盈亏号") = False Then
        If MessageBox.Show("是否删除","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question)=DialogResult.Yes Then
            Dim r As Row = Tables("盈亏对账主窗口_Table2").Current
            Dim n1 = r("盈亏号")
            Dim n2 = r("对账盈亏号")
            r.Delete
            Dim SumT1 As Integer=DataTables("盈亏对账数量表").Compute("Sum(对账数量)","[盈亏号] = '" & n1 &  "'")
            Dim dr As DataRow = DataTables("盈亏待对账表").Find("盈亏号='" & n1 &  "'")
            If dr IsNot Nothing Then
                dr("已对账数量")=SumT1
            End If
            Dim SumT2 As Integer= DataTables("盈亏对账数量表").Compute("Sum(对账盈亏号数量)","[对账盈亏号] = '" & n2 & "'")
            Dim drzb As DataRow = DataTables("盈亏待对账表").Find("盈亏号='" & n2 & "'")
            If drzb IsNot Nothing Then
                drzb("已对账数量")=SumT2*-1
                drzb("处理后数量")=drzb("亏损")+ drzb("已对账数量")
            End If
        End If
    Else
        Tables("盈亏对账主窗口_Table2").Current.Delete
    End If
End If

 回到顶部