Link to home
Create AccountLog in
Avatar of Rama Tito
Rama TitoFlag for Malaysia

asked on

What the meaning of "if (MaterialID.IndexOf("%")>-1)"

Please do elaborate the meaning of  "if (MaterialID.IndexOf("%")>-1)". What means of indication of "%" and  -1 as well.
if (MaterialID.IndexOf("%")>-1)
				{	
					strCommand ="select top 2000  ID,OrderNumber,PartNumber,Weight,DONumber,MaterialType,Receiveddate,MaterialNumber as MaterialCode,supplier,VesselName,StorageLocation,Status,ReceivedBy,ApprovedBy,Remarks   from rawMaterial where  " + dateCondition +  " and ID like '" + MaterialID +"'and materialtype not like '%sheet%' order by " + sortType;
				}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Rama Tito

ASKER

Is that returns -1 if reach end of file or database.