What is the most efficient code?
Writen like this:
if(vehicle.Branch.UWCompanyCode==typekey.UWCompanyCode.TC_CGIC){ if( vehicle.CollisionAPRateGroup_CG==-1 and (vehicle.CostNew_CG==null or vehicle.CurrentValue_CG==null)){ throwError(displaykey.Web.PolicyLine.Vehicle.NoVRGMessage) } } if(vehicle.Branch.UWCompanyCode==typekey.UWCompanyCode.TC_FA){ if( vehicle.CollisionAPRateGroup_CG==-1 and vehicle.CurrentValue_CG==null){ throwError(displaykey.Web.PolicyLine.Vehicle.NoVRGMessageFA) } }
or like this one?
if( vehicle.CollisionAPRateGroup_CG==-1){ if(vehicle.Branch.UWCompanyCode==typekey.UWCompanyCode.TC_CGIC and ( vehicle.CostNew_CG==null or vehicle.CurrentValue_CG==null)){ throwError(displaykey.Web.PolicyLine.Vehicle.NoVRGMessage) } if(vehicle.Branch.UWCompanyCode==typekey.UWCompanyCode.TC_FA and vehicle.CurrentValue_CG==null){ throwError(displaykey.Web.PolicyLine.Vehicle.NoVRGMessageFA) } }
I think that is the same thing