Dynamicweb.eCommerce.Orders Namespace : OrderStateCollection Class |
'Declaration
<DefaultMemberAttribute("Item")> <SerializableAttribute()> Public Class OrderStateCollection Inherits System.Collections.ObjectModel.Collection(Of OrderState)
[DefaultMemberAttribute("Item")] [SerializableAttribute()] public class OrderStateCollection : System.Collections.ObjectModel.Collection<OrderState>
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; } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Orders.OrderStateCollection
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