Dynamicweb 8 Documentation
OrderStateCollection Class
Members  Example 

Represents a collection of the OrderState objects.
Object Model
OrderStateCollection ClassOrderState Class
Syntax
Example
class MyPage : System.Web.UI.Page
{
 
   private void BuildOrderStateList()
   {
       //Set Order states
       OrderStateCollection orderStates = Dynamicweb.eCommerce.Common.Application.OrderStates;
       OrderStateList.Items.Clear();

       foreach( OrderState orderState in orderStates )
       {
           //Add to context menu
           ContextMenuButton contextOrderState = new ContextMenuButton();
           contextOrderState.Image = Icons.Icon.Type.Check;
           contextOrderState.OnClientClick = String.Format("setOrderState('{0}');", orderState.ID);
           contextOrderState.Text = orderState.Name;
           contextOrderState.DoTranslate = ContextMenuButton.TranslateStates.False;
           ContextSetOrderState.ChildItems.Add(contextOrderState);

           //Add to dropdown in ribbon
           OrderStateList.Items.Add(New ListItem(orderState.Name, orderState.ID));
       }
 
       OrderStateListView.Visible = true;
       }
   }
}
Inheritance Hierarchy

System.Object
   System.Collections.ObjectModel.Collection<T>
      Dynamicweb.eCommerce.Orders.OrderStateCollection

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

OrderStateCollection Members
Dynamicweb.eCommerce.Orders Namespace

Send Feedback