コード例 #1
0
 public OrderStatusSectionDataEditor(IData data)
 {
     _data          = data;
     _orderOverview = new OrderOverview();
     _orderOverview.OnOrderSelected += orderGuid =>
     {
         try
         {
             Guid guid;
             Guid.TryParse(orderGuid, out guid);
             if (guid == Guid.Empty)
             {
                 Log.Instance.LogError("Trying to open an order with a broken guid: " + orderGuid);
                 return;
             }
             API.CMS.CreateOrderDocument(guid);
         }
         catch (Exception ex)
         {
             Log.Instance.LogError(ex, "When opening order");
         }
     };
     if (int.TryParse(HttpContext.Current.Request["id"], out _containingDocumentId))
     {
         // !Page.IsPostBack && werkt niet
         //var orderSection = string.Empty;
         //var property = new Document(_containingDocumentId).getProperty("orderSection");
         //if (property != null)
         //	orderSection = property.Value.ToString();
         //_orderOverview.SetStatusFilter(orderSection);  dit kan niet, geeft raar effect na wisselen
     }
 }
コード例 #2
0
		public OrderStatusSectionDataEditor(IData data)
		{
			_data = data;
			_orderOverview = new OrderOverview();
			_orderOverview.OnOrderSelected += orderGuid =>
				{
					try
					{
						Guid guid;
						Guid.TryParse(orderGuid, out guid);
						if (guid == Guid.Empty)
						{
							Log.Instance.LogError("Trying to open an order with a broken guid: " + orderGuid);
							return;
						}
						API.CMS.CreateOrderDocument(guid);
					}
					catch (Exception ex)
					{
						Log.Instance.LogError(ex, "When opening order");
					}
				};
			if (int.TryParse(HttpContext.Current.Request["id"], out _containingDocumentId))
			{
				// !Page.IsPostBack && werkt niet
				//var orderSection = string.Empty;
				//var property = new Document(_containingDocumentId).getProperty("orderSection");
				//if (property != null)
				//	orderSection = property.Value.ToString();
				//_orderOverview.SetStatusFilter(orderSection);  dit kan niet, geeft raar effect na wisselen
			}
		}