Jaa


CreateFromCache Method (CommerceCache)

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Creates a DiscountItemCollection from the specified Cache.

Namespace:  Microsoft.CommerceServer.Runtime.Marketing
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Shared Function CreateFromCache ( _
    cache As CommerceCache _
) As DiscountItemCollection
'Usage
Dim cache As CommerceCache
Dim returnValue As DiscountItemCollection

returnValue = DiscountItemCollection.CreateFromCache(cache)
public static DiscountItemCollection CreateFromCache(
    CommerceCache cache
)
public:
static DiscountItemCollection^ CreateFromCache(
    CommerceCache^ cache
)
public static function CreateFromCache(
    cache : CommerceCache
) : DiscountItemCollection

Parameters

Return Value

Type: Microsoft.CommerceServer.Runtime.Marketing..::.DiscountItemCollection
A DiscountItemCollection object corresponding to the cache.

Exceptions

Exception Condition
ArgumentNullException

cache is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Creates a DiscountItemCollection from the specified CommerceCache.

The DiscountItemCollection contains all discounts that meet all of the following criteria:

  • The parent customer of the discount is not deleted or archived.

  • The parent campaign of the discount is not deleted or archived.

  • The parent campaign of the discount is active.

  • The discount is not deleted or archived.

  • The discount is active.

  • The discount has started or will start within one week.

  • The discount has not ended, or the discount has ended within the past month.

Permissions

See Also

Reference

DiscountItemCollection Class

DiscountItemCollection Members

CreateFromCache Overload

Microsoft.CommerceServer.Runtime.Marketing Namespace