Best way to check a condition?

Reply

Join Date: Feb 2007
Posts: 7
Reputation: mosarie79 is an unknown quantity at this point 
Solved Threads: 0
mosarie79 mosarie79 is offline Offline
Newbie Poster

Best way to check a condition?

 
0
  #1
Feb 27th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC