public static IEnumerable SW_GetReceivingOrders(string ShipwireUsername, string ShipwirePassword, string OrderStatus = null, string WarehouseIDs = null, string UpdatedAfter = null) { ShipwireClient sw = new ShipwireClient(ShipwireUsername, ShipwirePassword); eSWOrderStatus _s = eSWOrderStatus.all; string _w = ""; string _u = ""; if (!string.IsNullOrEmpty(OrderStatus)) { if (Enum.TryParse(OrderStatus, out _s)) _s = (eSWOrderStatus)Enum.Parse(typeof(eSWOrderStatus), OrderStatus); } if (!string.IsNullOrEmpty(WarehouseIDs)) _w = WarehouseIDs; if (!string.IsNullOrEmpty(UpdatedAfter)) _u = UpdatedAfter; return sw.GetReceivingOrders(_s, _w, _u); }
private void GetRO() { sw = new ShipwireClient(_uname, _pwd); List<SWReceiving> r = sw.GetReceivingOrders(eSWOrderStatus.canceled); txtRawData.Clear(); foreach (SWReceiving asn in r) { txtRawData.Text += string.Format("arr.type: {0}| warehouseID:{1}| processedDate:{2}\n", asn.arrangement.resource.type, asn.options.resource.warehouseId, asn.events.resource.processedDate); } }