Dynamicweb.eCommerce.Products Namespace > Product Class : StockGroup Property |
'Declaration
Public Property StockGroup As StockGroup
public StockGroup StockGroup {get; set;}
class MyPage : System.Web.UI.Page { protected System.Web.UI.WebControls.DropDownList StockGroupID; private Product product; public void CreateDropDown() { SortedList stocklist = new SortedList(); StockGroupCollection stocks = Dynamicweb.eCommerce.Common.Application.StockGroups; foreach (StockGroup stock in stocks) { if (stock.ID == product.StockGroup.ID) { stocklist[Convert.ToString(stock.ID)] = stock.Name; } } product.StockGroupID = Base.ChkString(Base.Request("StockGroupID")); Dynamicweb.eCommerce.Common.Gui.CreateDropDown(stocklist, StockGroupID, product.StockGroupID); } }
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