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
orderOrder
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
orderLineOrderLineThe 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
orderLinesOrderLineCollectionThe 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
productIdstring
Returns
InsertItem(int, OrderLine)
Inserts an element into the Collection<T> at the specified index.
protected override void InsertItem(int index, OrderLine item)
Parameters
indexintThe zero-based index at which
itemshould be inserted.itemOrderLineThe object to insert. The value can be null for reference types.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.-or-
indexis greater than Count.
Remove(OrderLine)
Removes the specified order line.
public void Remove(OrderLine theOrderLine)
Parameters
theOrderLineOrderLineThe 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
indexintThe zero-based index of the element to remove.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.-or-
indexis equal to or greater than Count.
RemoveLine(string)
Removes the order line.
public void RemoveLine(string orderlineId)
Parameters
orderlineIdstringThe 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
orderIdstringThe order ID.
SetItem(int, OrderLine)
Replaces the element at the specified index.
protected override void SetItem(int index, OrderLine item)
Parameters
indexintThe zero-based index of the element to replace.
itemOrderLineThe new value for the element at the specified index. The value can be null for reference types.
Exceptions
- ArgumentOutOfRangeException
<code class="paramref">index</code> is less than zero.-or-
indexis greater than Count.
UpdateBomOrderLine(OrderLine)
Updates the BOM order line.
public void UpdateBomOrderLine(OrderLine orderLine)
Parameters
orderLineOrderLineThe order line.
UpdateQuantity(OrderLine)
Updates the quantity.
public void UpdateQuantity(OrderLine orderLine)
Parameters
orderLineOrderLineThe order line.