Class ShippingCollection
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
Represents a collection of shipping objects
[Serializable]
[Obsolete]
public class ShippingCollection : Collection<Shipping>, IList<Shipping>, ICollection<Shipping>, IReadOnlyList<Shipping>, IReadOnlyCollection<Shipping>, IEnumerable<Shipping>, IList, ICollection, IEnumerable
- Inheritance
-
ShippingCollection
- Implements
- Inherited Members
- Extension Methods
Properties
this[int]
Gets the element at the specified index.
public Shipping this[int index] { get; }
Parameters
indexint- The index.
Property Value
Methods
Add(Shipping)
Adds distinct shipping to the collection
public void Add(Shipping shipping)
Parameters
shippingShipping
Remarks
If the shipping already exists in the collection it is not added
AddRange(IEnumerable<Shipping>)
Adds range of shippings to the collection
public void AddRange(IEnumerable<Shipping> shippings)
Parameters
shippingsIEnumerable<Shipping>
Remarks
If the payment already exists in the collection it is not added
Contains(Shipping)
Determines whether collection contains the given shipping.
public bool Contains(Shipping shipping)
Parameters
shippingShipping- shipping reference.
Returns
- bool
- Value indicating whether collection contains the given shipping.
Load(string)
Loads ShippingCollection using the specified query.
public void Load(string query)
Parameters
querystring- The query.
Examples
public ShippingCollection GetAllShippingmethods()
{
String query = "SELECT * FROM EcomShippings WHERE ShippingLanguageID = '" + Context.LanguageID() + "' ORDER BY ShippingID";
ShippingCollection col = new ShippingCollection();
col.Load(query);
return col;
}