Beispiel #1
0
        static void LoadProducts(List <PIMProduct> pimProds, Dictionary <string, Product> currentProducts)
        {
            PIMServices ps = new PIMServices();

            long lap = 0;

            // HACK:  Uncomment this
            Console.WriteLine("Import Products and Specifications");
            lap = DateTime.Now.Ticks;
            ps.ImportProducts(pimProds, currentProducts);
            Console.WriteLine(string.Format("Time taken {0:N4} secs", new TimeSpan(DateTime.Now.Ticks - lap).TotalMilliseconds / 1000D));

            Console.WriteLine("Import Product Notes");
            lap = DateTime.Now.Ticks;
            ps.ImportProductNotes(pimProds, currentProducts);
            Console.WriteLine(string.Format("Time taken {0:N4} secs", new TimeSpan(DateTime.Now.Ticks - lap).TotalMilliseconds / 1000D));

            Console.WriteLine("Import Product Components");
            lap = DateTime.Now.Ticks;
            ps.ImportProductComponents(pimProds, currentProducts);
            Console.WriteLine(string.Format("Time taken {0:N4} secs", new TimeSpan(DateTime.Now.Ticks - lap).TotalMilliseconds / 1000D));

            Console.WriteLine("Starting Database Maintenance Routines");
            lap = DateTime.Now.Ticks;
            ps.RunDatabaseMaintenanceRoutines();
            Console.WriteLine(string.Format("Time taken {0:N4} secs", new TimeSpan(DateTime.Now.Ticks - lap).TotalMilliseconds / 1000D));
        }