select case e.dataco.name
case "总金额"
if e.datarow.isNull("单价") andalso e.datarow.isnull("个数")=false andalso e.datarow.isnull("总金额")=false then
e.datarow("单价")=e.datarow("总金额")/e.datarow("个数")
end if
case "单价"
if e.datarow.isNull("总金额") andalso e.datarow.isnull("个数")=false andalso e.datarow.isnull("单价")=false then
e.datarow("总金额")=e.datarow("个数")*e.datarow("单价")