Поделиться через


GetCatalogs Method (String, String)

Returns a CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Function GetCatalogs ( _
    searchClause As String, _
    language As String _
) As CatalogsDataSet
'Usage
Dim instance As CatalogContext
Dim searchClause As String
Dim language As String
Dim returnValue As CatalogsDataSet

returnValue = instance.GetCatalogs(searchClause, _
    language)
public CatalogsDataSet GetCatalogs(
    string searchClause,
    string language
)
public:
CatalogsDataSet^ GetCatalogs(
    String^ searchClause, 
    String^ language
)
public function GetCatalogs(
    searchClause : String, 
    language : String
) : CatalogsDataSet

Parameters

  • searchClause
    Type: System..::.String
    The criteria, the search clause, to the catalogs.
  • language
    Type: System..::.String
    The culture code indicating the language that is associated with the Catalog.

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogsDataSet
Returns a CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information. The returned DataSet contains display names in all languages as columns with names formatted as <DisplayName>_<LANGUAGE>. To access the language-specific display name, you need to access that column. When using a catalog object in your code, the column corresponds to the DisplayName field, which has an ActiveLanguage field.

Remarks

The language is specified as a RFC 1766 CultureInfo class name. If nullNothingnullptra null reference (Nothing in Visual Basic), the language defaults to the current user interface culture.

The display names for the catalogs in the CatalogsDataSet will be in the language specified by language. The CatalogsDataSet will contain a column named LanguageExistsInCatalog which will contain 0 if the language does not exist in the catalog and 1 if the language exists in the catalog. The CatalogsDataSet will be sorted by the DisplayName and catalogs having the same display name will be sorted by the catalog name. If searchClause is nullNothingnullptra null reference (Nothing in Visual Basic) then this method returns all the catalogs in the catalog system. Any columns used in the searchClause should be surrounded by square brackets. Any string values referenced in the searchClause should be prefixed by N to allow searching Unicode data. example string searchClause = @"\[CatalogName\] LIKE N'%CatalogName%'"; You can also specify multiple conditions in the searchClause by using valid SQL operators. example string searchClause = @"\[CatalogNameName\] LIKE N'%CatalogName%' OR \[DisplayName\] like N'%display%'";

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

GetCatalogs Overload

Microsoft.CommerceServer.Catalog Namespace