Esempio n. 1
0
        public void ProcessNewMagentoOrders()
        {
            using(var store = new MagentoStore())
            {
                //1. process updates
                ProcessUpdatedMagentoOrders(store.GetUpdatedOrders());

                //2. do the new orders
                var orders = store.GetNewOrders();
                NLog.LogManager.GetCurrentClassLogger().Info("New magento orders: {0}", orders.Count);
                //don't insert order edited in magento in AX
                //orders.Where(o => !(o.OrderId.Contains("-"))).ToList().ForEach(x => CreateAxSalesOrder(x, "Magento"));
                //still log the edited orders though
                //orders.Where(o => o.OrderId.Contains("-")).ToList().ForEach(x => CreateProcessedOrder(x, "Magento"));
            }
        }
 public void ProcessUpdatedMagentoOrdersTest()
 {
     var service = new OrderService();
     var store = new MagentoStore();
     service.ProcessUpdatedMagentoOrders(store.GetUpdatedOrders());
 }