此主题相关图片如下:e)t$0_61du4m`rj6b2bb@2f.png
上面选中铜版,则执行如下计算:
如果W<38cm,则用ceiling(W/38)*W,(向上取整),否则按录入的算
(L+Lip)<40CM,则用50CM算,否则用ceiling(((L+Lip)+8)/5)*5算
最后结果为W*(L+Lip)
类似代码,如DataColChanged事件,不会做的上传实例。
If e.DataCol.Name = "铜板" AndAlso e.NewValue = True Then If e.DataRow("W") < 38 Then e.DataRow("结果") = Math.ceiling(e.DataRow("W")/38)*e.DataRow("W") Else e.DataRow("结果") = e.DataRow("W") End If End If