Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing collection property
Message
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01345879
Message ID:
01345884
Vues:
10
>Hi everybody,
>
>We're using SQLWhereBuilder in our application. This class has Conditions collection. I'm looking right now in the Watch window and I see it has List and InnerList. When I expand List I see
>
>List[0]
>
>-		List	{UNLV.IAP.WebControls.SqlWhereBuilderConditionCollection}	System.Collections.IList {UNLV.IAP.WebControls.SqlWhereBuilderConditionCollection}
>
>		_fieldId	"LetterCode"	string
>
>
>My question is - how can I access this _fieldID in my code?
>
>I need to check _fieldID for some specific string, what would be my syntax?
>
>Thanks a lot in advance.

I just added this code
  for (int i=0; i < this.SqlWhereBuilderPeople.Conditions.Count; i++) 
            {
                if (this.SqlWhereBuilderPeople.Conditions[i].FieldId.Equals("IsActive"))
                {
                    // Remove IsActive part in case we selected that condition - very rare case
                    RemoveIsActivePart = true;
                }
    
            }
Don't know if there is a simpler/better method.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform