/** transfer products from freestyle to mozu */ public void TransferProductsToMozu(int page=0, string sku=null) { if (this.BackgroundWorker != null) this.BackgroundWorker.ReportProgress(0, "Calling Freestyle Product Api"); Mozu mozu = new Mozu(); FreeStyleInterface freestyle = new FreeStyleInterface(); Warehouse.Inventory[] products = freestyle.getProducts(page, sku); if (products == null || products.Length == 0) return; int count = 1; foreach (Warehouse.Inventory product in products) { mozu.saveProduct(product); if (this.BackgroundWorker != null) this.BackgroundWorker.ReportProgress(0, count++ + ". Saved Mozu Product " + product.SKU); } if (this.BackgroundWorker != null) this.BackgroundWorker.ReportProgress(0, "Finished Transferring Freestyle Products to Mozu"); }