我想问一下我的工作。
adult, child,concession
我必须找到来自的特定客户类型listbox customer type
。
这是我的代码:
Dim iCounter As Integer = 0
Dim sCustType As String = ""
sCustType = "adult" Or "child" Or "concession"
For iCounter = 0 To lstCustType.Items.Count + 1
If lstCustType.Items(iCounter) = sCustType Then
lstQuoteResult.Items.Add(lstQuoteNum.Items(iCounter))
lstCustResult.Items.Add(lstCustType.Items(iCounter))
lstBagResult.Items.Add(lstBaggageWeight.Items(iCounter))
lstBagWeightResult.Items.Add(lstBagWeight.Items(iCounter))
lstDestResult.Items.Add(lstDestinationCost.Items(iCounter))
lstTripResult.Items.Add(lstHighSesason.Items(iCounter))
lstQuiteResult.Items.Add(lstQuiteCarriageCost.Items(iCounter))
lstInsResult.Items.Add(lstInsurance.Items(iCounter))
lstInsCResult.Items.Add(lstInsuraneCost.Items(iCounter))
lstReturnResult.Items.Add(lstReturnTripCost.Items(iCounter))
lstTotalResult.Items.Add(lstTotal.Items(iCounter))
End If
Next
但它不起作用。显然有一个错误说Conversion from string "adult" to type 'Long' is not valid.
请帮我。
谢谢。