public static OrderManagementContext GetOrderManageContext() { if (orderMgmtContext == null) { var ordersAgent = new OrderSiteAgent(GetSiteName()); orderMgmtContext = OrderManagementContext.Create(ordersAgent); } return(orderMgmtContext); }
private static void LoadOrderContext() { if (orderContext == null) { var siteName = Configuration.CSSiteName; ordersAgent = new OrderSiteAgent(siteName); context = OrderManagementContext.Create(ordersAgent); manager = context.PurchaseOrderManager; orderContext = CommerceServer.Core.Runtime.Orders.OrderContext.Create(siteName); } }