vbscript 覆盖计算动态数据的值
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 覆盖计算动态数据的值相关的知识,希望对你有一定的参考价值。
Dim ValeuraneufHTMontant as decimal
Dim Coefficientdevetuste as decimal
Dim Valeurvenale as decimal
Dim Valeuraneufbonus as decimal
Dim objEvaluationLine as clsLossEvaluationLine
objEvaluationLine=GetObjectToBeUsedForThisClass(GetType(clsLossEvaluationLine).Name, ListOfObjectsToBeUsedInFormula)
Trace("objEvaluationLine found " & objEvaluationLine.AsString(""),7)
if objEvaluationLine isnot nothing then
'we call the rule that is used to enable or disable the "is calculated" dynamic data, the #2
if GetOtherRate("Modifiable - Ligne Evaluation Sinistre Bien Immobilier - Valeur Venale")(0)=False
result(0)=Valeurvenale
else
'we do our calculation of the Valeurvenale
ValeuraneufHTMontant=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"ValeuraneufHTMontant",Nothing,True)
Trace("ValeuraneufHTMontant="& ValeuraneufHTMontant,7)
Coefficientdevetuste=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"Coefficientdevetuste",Nothing,True)
Trace("Coefficientdevetuste="& Coefficientdevetuste,7)
Valeurvenale=clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objEvaluationLine,"Valeurvenale",Nothing,True)
Trace("Ancienne Valeurvenale="& Valeurvenale,7)
if ValeuraneufHTMontant>0 then
if Coefficientdevetuste<=0 or Coefficientdevetuste>100 then
Coefficientdevetuste=1
Else
Coefficientdevetuste=Coefficientdevetuste/100
end if
result(0)=ValeuraneufHTMontant*Coefficientdevetuste
Else
'invalid user entry of the calculation parameters, so we return the current value
result(0)=Valeurvenale
End if
end if
else
result(0)=0
end if
以上是关于vbscript 覆盖计算动态数据的值的主要内容,如果未能解决你的问题,请参考以下文章