Table of Contents

Class OrderLineCollection

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll

Represents a collection of the OrderLine objects.

[Serializable]
public class OrderLineCollection : Collection<OrderLine>, IList<OrderLine>, ICollection<OrderLine>, IReadOnlyList<OrderLine>, IReadOnlyCollection<OrderLine>, IEnumerable<OrderLine>, IList, ICollection, IEnumerable
Inheritance
OrderLineCollection
Implements
Inherited Members
Extension Methods

Constructors

OrderLineCollection(Order)

public OrderLineCollection(Order order)

Parameters

order Order

Properties

CountOnlyBom

Gets the count of BOM.

public int CountOnlyBom { get; }

Property Value

int

CountOnlyDiscounts

Gets the number of OrderLines of type "Discount" and "ProductDiscount".

public int CountOnlyDiscounts { get; }

Property Value

int

CountOnlyProducts

Gets the count of products.

public int CountOnlyProducts { get; }

Property Value

int

CountOnlyTaxes

Gets the number of OrderLines of type "Tax".

public int CountOnlyTaxes { get; }

Property Value

int

Order

Gets or sets the order.

public Order Order { get; set; }

Property Value

Order

Price

Gets the price.

public PriceInfo Price { get; }

Property Value

PriceInfo

Methods

Add(OrderLine)

Adds the specified order line.

public void Add(OrderLine orderLine)

Parameters

orderLine OrderLine

The order line.

Add(OrderLine, bool)

Adds the specified order line.

public void Add(OrderLine orderLine, bool doMerge)

Parameters

orderLine OrderLine

The order line.

doMerge bool

if set to true try to merge.

Add(OrderLineCollection)

Adds the specified order lines.

public void Add(OrderLineCollection orderLines)

Parameters

orderLines OrderLineCollection

The order lines.

ClearCachedPrices()

Clears the cached prices for all OrderLines in this OrderLineCollection.

public void ClearCachedPrices()

ClearItems()

Removes all elements from the Collection<T>.

protected override void ClearItems()

GetTotalsByProductId(string)

public OrderLineCollection.TotalAndQuantity GetTotalsByProductId(string productId)

Parameters

productId string

Returns

OrderLineCollection.TotalAndQuantity

InsertItem(int, OrderLine)

Inserts an element into the Collection<T> at the specified index.

protected override void InsertItem(int index, OrderLine item)

Parameters

index int

The zero-based index at which item should be inserted.

item OrderLine

The object to insert. The value can be null for reference types.

Exceptions

ArgumentOutOfRangeException

index is less than zero.

-or-

index is greater than Count.

Remove(OrderLine)

Removes the specified order line.

public void Remove(OrderLine theOrderLine)

Parameters

theOrderLine OrderLine

The order line.

RemoveDiscounts()

Removes the discounts.

public void RemoveDiscounts()

RemoveItem(int)

Removes the element at the specified index of the Collection<T>.

protected override void RemoveItem(int index)

Parameters

index int

The zero-based index of the element to remove.

Exceptions

ArgumentOutOfRangeException

index is less than zero.

-or-

index is equal to or greater than Count.

RemoveLine(string)

Removes the order line.

public void RemoveLine(string orderlineId)

Parameters

orderlineId string

The order line ID.

RemoveTaxes()

Removes all Tax OrderLines from the collection.

public void RemoveTaxes()

Save(string)

Saves the specified order ID.

public void Save(string orderId)

Parameters

orderId string

The order ID.

SetItem(int, OrderLine)

Replaces the element at the specified index.

protected override void SetItem(int index, OrderLine item)

Parameters

index int

The zero-based index of the element to replace.

item OrderLine

The new value for the element at the specified index. The value can be null for reference types.

Exceptions

ArgumentOutOfRangeException

index is less than zero.

-or-

index is greater than Count.

UpdateBomOrderLine(OrderLine)

Updates the BOM order line.

public void UpdateBomOrderLine(OrderLine orderLine)

Parameters

orderLine OrderLine

The order line.

UpdateQuantity(OrderLine)

Updates the quantity.

public void UpdateQuantity(OrderLine orderLine)

Parameters

orderLine OrderLine

The order line.

To top