public bool IsOrderStatus(Order order, OrderStatusCode orderStatus) { return(OrderRoot.Elements().Any( item => Convert.ToInt32(item.Element("OrderKey").Value) == order.OrderKey && item.Element("Status").Value == orderStatus.ToString() )); }
public static string ShortenOrderStatus(OrderStatusCode orderStatus) { switch (orderStatus) { case OrderStatusCode.Submitted: return("Sbtd"); case OrderStatusCode.ApiCanceled: case OrderStatusCode.Cancelled: return("Cxld"); case OrderStatusCode.Filled: return("Fld"); default: return(orderStatus.ToString()); } }