以文本方式查看主题

-  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=67714)

--  作者:jinzhengbe
--  发布时间:2015/4/29 17:07:00
--  面这段代码 想改成下面这样 应该怎么写
If e.DataRow("dc") Then
e.DataRow("price")=e.DataRow("dc") *e.DataRow("markprice")/100
End If

上面这段代码 想改成下面这样 应该怎么写?
非常非常感谢



If e.DataRow("dc") 或者 e.DataRow("pc") Then
e.DataRow("price")=e.DataRow("dc") *e.DataRow("markprice")/100

or
e.DataRow("dc")= e.DataRow("price")/ e.DataRow("markprice") 

End If

--  作者:Bin
--  发布时间:2015/4/29 17:12:00
--  
if e.DataRow("dc")  orelse e.DataRow("pc") then
  e.DataRow("price")=e.DataRow("dc") *e.DataRow("markprice")/100
else 
 e.DataRow("dc") =e.DataRow("price")/ e.DataRow("markprice") 

end if

--  作者:jinzhengbe
--  发布时间:2015/4/29 17:41:00
--  


if e.DataRow("dc")  orelse e.DataRow("price") then
  e.DataRow("price")=e.DataRow("dc") *e.DataRow("markprice")/100
else 
 e.DataRow("dc") =e.DataRow("price")/ e.DataRow("markprice") 

end if


不好意思啊 我好想翻译错意思了 

我的意思是这样的 
前提  有两个列  一个是 dc  一个是price

如果 用户输入 dc  则系统 自动 计算 price的值 price的值将会不能变动
如果 用户输入 price的值 则 系统自动计算 dc的值 dc的值将不会变动

上面的代码 只能输入dc的值 并计算price的值, 
不能输入 price的值 计算dc的值

请问怎么改,非常感谢