Commerce Server General - Root Categories with specific property

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > February 2004 > Root Categories with specific property





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Root Categories with specific property
ScottE

2004-02-07, 9:36 am

This is just a thought, but I know that root categories
don't have a ParentOID, or at least it's -1 or something
like that. You might be able to do a catalog search
searching onthose two properties (ParentOID and
DisplayFlag) and only return category objects. Otherwise,
I'm afraid you're stuck iterating though each of the
categories and checking them one by one, where you could
then dump the ones you want into another collection or
array.

Best of Luck!

- Scott

>-----Original Message-----
>Hi,
>
>I am getting all root categories by this function:
>public static DataSet RootCategories()
>{
> ProductCatalog catalog =
>CommerceContext.Current.CatalogSystem.GetCatalog
>(Constants.CatalogName);
>
> return catalog.GetRootCategories() ;
>}
>
>Thats fine.
>
>But now I want Root categories for which I
>have "DisplayFlag = 'True'".
>
>How can I add this search criteria here. Note: I need

only
>Root categories here.
>
>Thanks in advance
>-dc
>
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com