mosarie79 0 Newbie Poster

What would be the best way to check and see if 27 diff conditions were true before executing a statement? This is the code block I'm needing to add this to. The var objAddress.CountryCode needs to have 27 poss values that the code should be checking before executing.


if not isnothing(objGW) then
if objGW.Load(objToken, objShipGateway.ShipGateway_ID) then
if objAddress.CountryCode <>"AR" then
if objGW.Activated then
'get services and output here'
xmlShipRates = objGW.RateShop(objToken, objShipment)
colRates = xmlShipRates.documentElement.selectNodes("Service")
if colRates.Count > 0 AND objShipGateway.Name = "UPS" then
blnOnlineUPS = True
end if
for each objRate in colRates
sServiceName = cbXML.GetElementValue(objRate, "ServiceName")
if (not blnOnlineUPS) And (Left(sServiceName,4) = "UPS ") then
sServiceName = sServiceName & "**"
blnCustomUPS = True
end if
Response.Write("<input type=radio")
if Not bFoundShipper Then
Response.Write(" checked")
bFoundShipper = True
End If
Response.Write(" name=selShipMeth" & i & " value=""" & objShipGateway.ShipGateway_ID & "|" & cbXML.GetAttributeValue(objRate, "Code") & "|" & Replace(sServiceName,"""","&quot;") & """>" & sServiceName & " (" & cbLocale.FormatCurrency(cbXML.GetElementValue(objRate, "Rate"), objStore.Currencies.DefaultItem) & ") <br>" & vbcrlf)
next
end if
end if
objGW.Dispose()
end if
objGW = nothing
end if

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.