1.不会用replacefor:现有一张表(外部),内有数量,单价,金额.如何用replacefor完成数量*单价=金额.
2.有如下代码:
Dim rq As Date = Date.Today
Dim flt As String = "kpr='" & user.name & "' And ddrq = '" & rq & "'"
Dim cnt As Integer = DataTables("dingdan").Compute("Count([ddrq])",flt)
Dim sum1 As Double = DataTables("dingdan").Compute("sum([je])",flt)
Dim ts1 As WinForm.TextBox = e.Form.Controls("TextBox4")
ts1.Value="当前用户:" & user.name & vbcrlf & "今天完成订单:" & cnt & "份 合计金额:" & sum1
为什么sum1会是4位小数?数量,单价,金额都设为2位的.如果行数多了用Round误差会不会很大?
[此贴子已经被作者于2013-1-9 0:14:38编辑过]