以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求助:按钮代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=161288)

--  作者:刘异
--  发布时间:2021/3/12 9:48:00
--  求助:按钮代码

老师好:这个代码怎样改成按钮,在按钮中应该怎样写呢?多谢。



If e.DataCol.name = "审核" Then
Dim pr As DataRow = e.DataRow.GetParentRow("订单")
If pr IsNot Nothing Then
Dim crs As List(of DataRow) = pr.GetChildRows("订单明细")
Dim cnt As Integer
For Each cr As DataRow In crs
If cr("审核") = True
cnt = cnt + 1
End If
Next
pr("审核") = (crs.Count = cnt)
End
If

End
If


--  作者:有点蓝
--  发布时间:2021/3/12 9:58:00
--  
dim r as row = tables("订单").current
if r is nothing then return
dim c1 as integer = datatables("订单明细").compute("count(编号)","编号=‘“ & r("编号") & ”’ and 审核=false")
r("审核") = (c1 = 0)