以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  金额计算  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=144607)

--  作者:青丘狐
--  发布时间:2019/12/25 11:47:00
--  金额计算

Select Case e.DataCol.Name
    Case "数量","费用单价"
        If e.DataRow.IsNull("费用单价") = False Then
            e.DataRow("费用金额") = e.DataRow("数量") * e.DataRow("费用单价")
        End If
End Select

 

输入费用单价后可以计算,如果删除费用单价后费用金额应该变空值,怎样费用金额也变空值?

 

 


--  作者:有点蓝
--  发布时间:2019/12/25 12:06:00
--  
Select Case e.DataCol.Name
    Case "数量","费用单价"
        If e.DataRow.IsNull("费用单价")  orelse e.DataRow.IsNull("数量") Then
e.DataRow("费用金额") = nothing
else
            e.DataRow("费用金额") = e.DataRow("数量") * e.DataRow("费用单价")
        End If
End Select