Dynamicweb 8 Documentation
GetOrders(String,Boolean) Method
Example 

The SQL query.
if set to true get order lines from DB and attach to orders.
Gets the orders.
Syntax
'Declaration
 
Public Overloads Shared Function GetOrders( _ 
   ByVal SQL As String, _ 
   ByVal preLoadOrderLines As Boolean _ 
) As OrderCollection
public static OrderCollection GetOrders( 
   string SQL,
   bool preLoadOrderLines 
)

Parameters

SQL
The SQL query.
preLoadOrderLines
if set to true get order lines from DB and attach to orders.
Example
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
       }
   }
}
Requirements

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

See Also

Reference

Order Class
Order Members
Overload List

Send Feedback