Dynamicweb.eCommerce.Products Namespace : PeriodCollection Class |
'Declaration
<DefaultMemberAttribute("Item")> <SerializableAttribute()> Public Class PeriodCollection Inherits System.Collections.ObjectModel.Collection(Of Period)
[DefaultMemberAttribute("Item")] [SerializableAttribute()] public class PeriodCollection : System.Collections.ObjectModel.Collection<Period>
class MyPage : System.Web.UI.Page { protected System.Web.UI.WebControls.DropDownList creationPeriod; protected System.Web.UI.WebControls.DropDownList activePeriod; private void Page_Load(System.Object sender, System.EventArgs e) { if (!IsPostBack) { System.Collections.SortedList periodlist = new System.Collections.SortedList(); PeriodCollection periods = Dynamicweb.eCommerce.Common.Context.Periods; foreach (Period aperiod in periods) { if ((aperiod.ID != null)) { periodlist[Convert.ToString(aperiod.ID)] = aperiod.Name; } } Dynamicweb.eCommerce.Common.Gui.CreateDropDown(periodlist, creationPeriod, ""); Dynamicweb.eCommerce.Common.Gui.CreateDropDown(periodlist, activePeriod, ""); } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Products.PeriodCollection
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