Exemple #1
0
        public List<salesOrderEntity> GetNewMagentoOrders()
        {
            var table = new ProcessedOrders();
            var lastOrder = table.All(where: "where store = @0", args: "Magento", orderBy: "storeentityid DESC", limit: 1).First();

              	filters mf = new filters();
               	complexFilter[] cpf = new complexFilter[1];
               	complexFilter mcpf = new complexFilter();
               	mcpf.key = "entity_id"; //"increment_id";//
               	associativeEntity mas = new associativeEntity();
               	mas.key = "gt";
               	mas.value = lastOrder.StoreEntityId; //"CDO00022569";
               	mcpf.value = mas;
               	cpf[0] = mcpf;
               	mf.complex_filter = cpf;
              	salesOrderEntity[] soe = _mservice.salesOrderList(_mlogin, mf);
              	return soe.ToList();
        }
Exemple #2
0
        public List<salesOrderEntity> GetUpdateMagentoOrders()
        {
            var table = new ProcessedOrders();
            var lastUpdatedOrder = table.All(where: "where store = @0", args: "Magento", orderBy: "storeupdatedat DESC", limit: 1).First();
            var d = lastUpdatedOrder.StoreUpdatedAt.AddSeconds(-2).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");

            filters mf = new filters();
               	complexFilter[] cpf = new complexFilter[1];
               	complexFilter mcpf = new complexFilter();
               	mcpf.key = "updated_at";
               	associativeEntity mas = new associativeEntity();
               	mas.key = "gt";
               	mas.value =  lastUpdatedOrder.StoreUpdatedAt.AddSeconds(-2).ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss");
               	mcpf.value = mas;

               	cpf[0] = mcpf;

               	mf.complex_filter = cpf;
              	salesOrderEntity[] soe = _mservice.salesOrderList(_mlogin, mf);
              	return soe.ToList();
        }