Dim PolicyVersion As clsPolicyVersion
Dim SubscribedCoverage As clsSubscribedCoverage
Dim OfferedCoverage As clsOfferedCoverage
PolicyVersion = GetCurrentPolicy()
If PolicyVersion IsNot Nothing Then
For Each SubscribedCoverage In PolicyVersion.GetListOfAllSubscribedCoverages
OfferedCoverage = SubscribedCoverage.MyOfferedCoverage
If OfferedCoverage IsNot Nothing Then
If OfferedCoverage.OfferedServiceCode = "CNOL" Then
Dim objSubscribedCoverage1 As clsSubscribedCoverage
Dim NoEmployees as Integer
objSubscribedCoverage1 = GetPolicyLevelCoverage("CNOL")
NoEmployees = clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objSubscribedCoverage1.MySubscribedServiceSpecificData, "NonOwnedLiabilityNumberofEmployees", Nothing, True)
Dim NonOwnedAutos as decimal = NoEmployees * NonOwnedHired1
SetValueForThisData("Transportation Vehicle-->RW - Vehicle, Uninsured Motorists BI - Non Owned Autos",NonOwnedAutos)
End If
If OfferedCoverage.OfferedServiceCode = "CHA" Then
Dim objSubscribedCoverage2 As clsSubscribedCoverage
Dim CostofHireLimit as Integer
objSubscribedCoverage2 = GetPolicyLevelCoverage("CHA")
CostofHireLimit = clsDynamicMethodOrPropertyCall.Manager.ValueForAPropertyName(objSubscribedCoverage2.MySubscribedServiceSpecificData, "HiredAutoCostofHire", Nothing, True)
Dim HiredAutosPer as decimal = CostofHireLimit * 0.01 * NonOwnedHired2
SetValueForThisData("Transportation Vehicle-->RW - Vehicle, Uninsured Motorists BI - Hired Autos",HiredAutosPer)
Exit for
End If
End If
Next
End If