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
CountOnlyDiscounts
Gets the number of OrderLines of type "Discount" and "ProductDiscount".
public int CountOnlyDiscounts { get; }
Property Value
CountOnlyProducts
Gets the count of products.
public int CountOnlyProducts { get; }
Property Value
CountOnlyTaxes
Gets the number of OrderLines of type "Tax".
public int CountOnlyTaxes { get; }
Property Value
Order
Gets or sets the order.
public Order Order { get; set; }
Property Value
Price
Gets the price.
public PriceInfo Price { get; }
Property Value
Methods
Add(OrderLine)
Adds the specified order line.
public void Add(OrderLine orderLine)
Parameters
orderLine
OrderLineThe order line.
Add(OrderLine, bool)
Adds the specified order line.
public void Add(OrderLine orderLine, bool doMerge)
Parameters
Add(OrderLineCollection)
Adds the specified order lines.
public void Add(OrderLineCollection orderLines)
Parameters
orderLines
OrderLineCollectionThe 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
InsertItem(int, OrderLine)
Inserts an element into the Collection<T> at the specified index.
protected override void InsertItem(int index, OrderLine item)
Parameters
index
intThe zero-based index at which
item
should be inserted.item
OrderLineThe 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
OrderLineThe 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
intThe 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
stringThe 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
stringThe order ID.
SetItem(int, OrderLine)
Replaces the element at the specified index.
protected override void SetItem(int index, OrderLine item)
Parameters
index
intThe zero-based index of the element to replace.
item
OrderLineThe 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
OrderLineThe order line.
UpdateQuantity(OrderLine)
Updates the quantity.
public void UpdateQuantity(OrderLine orderLine)
Parameters
orderLine
OrderLineThe order line.