Dynamicweb.eCommerce.Orders Namespace > OrderCollection Class > Sort Method : Sort(String,SortOrderType) Method |
'Declaration
Public Overloads Sub Sort( _ ByVal FieldName As String, _ ByVal SortOrder As OrderCollection.SortOrderType _ )
public void Sort( string FieldName, OrderCollection.SortOrderType SortOrder )
class MyPage : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { int uid = new Dynamicweb.Frontend.Extranet().UserID; if (uid == 0) { Response.End(); } CustomerOrderCollection customerOrders = new CustomerOrderCollection(); customerOrders.Load(uid); customerOrders.Sort("OrderID", OrderCollection.SortOrderType.Asc); foreach (Order enumOrder in customerOrders) { foreach (OrderLine orderLine in enumOrder.OrderLines) { //TODO: insert your code here } } } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2