以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  前辈们帮忙修改一下代码呗。谢谢了!!  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=21460)

--  作者:jinzhengbe
--  发布时间:2012/7/13 1:22:00
--  前辈们帮忙修改一下代码呗。谢谢了!!

(如果当前表(quhuojilu)的状态 小于6  执行条件1, 条件2,

   如果当前表(quhuojilu)的状态 >=6  执行条件3( quhuojilu 的状态 = quhuolu表的 状态)

If e.DataRow("状态")< 6 Then  (如果当前表(quhuojilu)的状态 小于6
Dim aa As Integer= e.DataRow("应取数量")-e.DataRow("已取数量")
If e.DataRow("应取数量") <> 1 And aa >0 Then    ‘条件1
e.DataRow ("状态")= 2
Else If e.DataRow("应取数量") <> 1 And aa =0 Then  ’条件2
e.DataRow ("状态")= 6

Else
Dim tbl As Table = Tables("quhuolu")
    If tbl.Current IsNot Nothing Then
            e.DataRow("状态")= Tables("quhuolu").Current("状态") 

End If
End If
End If