November Happy Hour will be moved to Thursday December 5th.

Class LineItemCollection

A collection of line items in the system.

Inheritance
System.Object
LineItemCollection
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IEnumerable<LineItem>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Orders
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public class LineItemCollection : MetaStorageCollectionBase<LineItem>, IList, ICollection, IEnumerable<LineItem>, IEnumerable

Constructors

LineItemCollection()

Initializes a new instance of the LineItemCollection class.

Declaration
public LineItemCollection()

LineItemCollection(OrderForm)

Initializes a new instance of the LineItemCollection class.

Declaration
public LineItemCollection(OrderForm parent)
Parameters
Type Name Description
OrderForm parent

The parent.

Properties

DeletedLineItems

Gets the deleted line items.

Declaration
public IEnumerable<LineItem> DeletedLineItems { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<LineItem>

The deleted line items.

Parent

Gets the parent.

Declaration
public OrderForm Parent { get; }
Property Value
Type Description
OrderForm

The parent.

Methods

Add(LineItem)

Adds the specified value.

Declaration
public override int Add(LineItem value)
Parameters
Type Name Description
LineItem value

The value.

Returns
Type Description
System.Int32
Overrides
Mediachase.Commerce.Storage.MetaStorageCollectionBase<Mediachase.Commerce.Orders.LineItem>.Add(Mediachase.Commerce.Orders.LineItem)

Add(LineItem, Boolean)

Adds the specified value.

Declaration
public virtual int Add(LineItem value, bool lineItemRollup)
Parameters
Type Name Description
LineItem value

The value.

System.Boolean lineItemRollup

if set to true, adds to existing quantity, otherwise adds as a new lineitem.

Returns
Type Description
System.Int32

AddNew()

Adds a new LineItem to the collection and assigns it unique LineItemId

Declaration
public LineItem AddNew()
Returns
Type Description
LineItem

FindItem(Int32)

Finds LineItem with specified LineItemId in the collection.

Declaration
public LineItem FindItem(int lineItemId)
Parameters
Type Name Description
System.Int32 lineItemId
Returns
Type Description
LineItem

FindItemByCatalogEntryId(String)

Finds LineItem with specified entry id in the collection.

Declaration
public LineItem FindItemByCatalogEntryId(string catalogEntryId)
Parameters
Type Name Description
System.String catalogEntryId

The id of the entry to search for.

Returns
Type Description
LineItem

GetFormattedString(Int32, String)

Returns string of properties specified by type parameter separated by separator.

Declaration
public string GetFormattedString(int type, string separator)
Parameters
Type Name Description
System.Int32 type
System.String separator
Returns
Type Description
System.String
Remarks

Type can be one of the following: 1 - LineItemIds, 2 - CatalogEntryIds, 3 - DisplayName

ToString()

Returns comma-separated list of LineItemIds.

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable