以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何实现每隔30分钟计费?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=170052)

--  作者:lin98
--  发布时间:2021/7/9 19:49:00
--  如何实现每隔30分钟计费?
资料
表A:   时间(分钟)    单价       计费金额
             29              12            0
             30              12            12
             59              12            12      
             60              12            24
是以每隔30分钟计费,不是等于或大于(只要=30或大于30)就计费。如何实现每隔30分钟计费?




--  作者:z769036165
--  发布时间:2021/7/10 8:35:00
--  
(时间\\30) * 12
--  作者:有点蓝
--  发布时间:2021/7/10 9:30:00
--  
datacolchanged事件

If e.DataCol.Name = "时间" Then
    If e.DataRow.IsNull("时间"Then 
        e.
DataRow("计费金额") = Nothing 
    
Else
dim je as double = math.Floor(e.DataRow("时间") / 30) * e.DataRow("单价")
        e.DataRow("计费金额") = je
    End
 If
End If