Dynamicweb.eCommerce.Orders Namespace > OrderField Class : Lock Method |
class MyPage : System.Web.UI.Page { public OrderFieldCollection GetOrderFields() { if (HttpContext.Current.Application["Ecom:OrderFields"] == null) { OrderFieldCollection ofc = OrderField.getOrderFields(); foreach (OrderField of in ofc) { of.Lock(); } HttpContext.Current.Application.Lock(); HttpContext.Current.Application.Set("Ecom:OrderFields", ofc); HttpContext.Current.Application.UnLock(); return ofc; } else { return (OrderFieldCollection)HttpContext.Current.Application["Ecom:OrderFields"]; } } }
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