protected string GetCategory() { string result = "\n" + m_categoriesFileName + ": "; ProgressText += result + "Extracting..."; var stopWatch = new StopWatch(true); string tempDisplay = ProgressText; MivaMerchantJsonBridge json = new MivaMerchantJsonBridge(); List<CategoryRecord> items = (List<CategoryRecord>)json.RequestFromService(MivaMerchantJsonBridge.DataGroup.CategoryNames); ProgressText = string.Format("{0}{1} rows completed ({2})", tempDisplay, items.Count, stopWatch.Lap()); ProgressText = string.Format("{0}Completed ({1}){2}Uploading to server...", tempDisplay, stopWatch.Lap(), Environment.NewLine); if(items != null & items.Count > 0) { //populate m_categoryDictionary ?? } // result += m_boostService.WriteTable(m_alias, m_categoriesFileName, cats, false); ProgressText = string.Format("{0}({1})", result, stopWatch.Stop()); return result; }
protected override string GetCatalog() { string result = "\n" + CatalogFilename + ": "; string ProgressText = result + "Extracting..."; var stopWatch = new StopWatch(true); var products = new List<_4_Tell.ProductRecord>(); string tempDisplay = ProgressText; MivaMerchantJsonBridge json = new MivaMerchantJsonBridge(); products = (List<ProductRecord>)json.RequestFromService(MivaMerchantJsonBridge.DataGroup.Catalog); ProgressText = string.Format("{0}{1} rows completed ({2})", tempDisplay, products.Count, stopWatch.Lap()); ProgressText = string.Format("{0}Completed ({1}){2}Uploading to server...", tempDisplay, stopWatch.Lap(), Environment.NewLine); result += m_boostService.WriteTable( m_alias, CatalogFilename, products, false); ProgressText = string.Format("{0}({1})", result, stopWatch.Stop()); return result; }