예제 #1
0
        internal int UpdatePrices(string priceFullXmlFilePath, BackgroundWorker worker, DoWorkEventArgs e, ProgressBar progressBar)
        {
            PriceFullXmlDecoder xmlDecoder = new PriceFullXmlDecoder();
            ICollection <Price> pricesList = xmlDecoder.DecodePricesFromFile(priceFullXmlFilePath);
            int pricesNum = InsertPricesIntoCatalog(pricesList, worker, e, progressBar);

            return(pricesNum);
        }
예제 #2
0
        static void TestGetPricesFromXml(int limit)
        {
            PriceFullXmlDecoder decoder    = new PriceFullXmlDecoder();
            string priceFullXmlFilePath    = $@"{Constants.XmlPriceFullDirPath}\PriceFull7290027600007-125-201608160341.xml";
            ICollection <Price> pricesList = decoder.DecodePricesFromFile(priceFullXmlFilePath);
            int i = 0;

            foreach (var price in pricesList)
            {
                Console.WriteLine(price);
                i++;
                if (i == limit)
                {
                    return;
                }
            }
        }