Dynamicweb 8 Documentation
Period Class
Members  Example 

General-purpose Period class, used, for example, for prices
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class Period 
[SerializableAttribute()] 
public class Period 
Example
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, "");
       }
   }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Products.Period

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

Period Members
Dynamicweb.eCommerce.Products Namespace

Send Feedback