Class LineItemCollection
A collection of line items in the system.
Inheritance
Implements
Inherited Members
Namespace: Mediachase.Commerce.Orders
Assembly: Mediachase.Commerce.dll
Version: 13.30.0Syntax
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
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 |
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 |