Dynamicweb.eCommerce.Orders Namespace > Order Class > GetOrders Method : GetOrders(String,Boolean) Method |
true
get order lines from DB and attach to orders.
'Declaration
Public Overloads Shared Function GetOrders( _ ByVal SQL As String, _ ByVal preLoadOrderLines As Boolean _ ) As OrderCollection
public static OrderCollection GetOrders( string SQL, bool preLoadOrderLines )
true
get order lines from DB and attach to orders.class MyPage : System.Web.UI.Page { private void DoDelete() { StringBuilder SQL = new StringBuilder(); SQL.Append("SELECT TOP 20 * FROM EcomOrders "); SQL.Append("WHERE OrderCart = " + Database.SqlBool(false) + " "); SQL.Append("ORDER BY OrderDate DESC, OrderID DESC"); Dynamicweb.eCommerce.Orders.OrderCollection orderCol = Dynamicweb.eCommerce.Orders.Order.getOrders(SQL.ToString()); foreach(Dynamicweb.eCommerce.Orders.Order o in orderCol){ //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