Esempio n. 1
0
        private void DownloadProducts()
        {
            try
            {
                var taimyrScrapper = new TaimyrScrapper();
                taimyrScrapper.Output = WriteOutputAsync;
                //List<TimyrPriceRow> timyrPriceRows = taimyrScrapper.DownloadPrice();
                //gridControl1.DataSource = timyrPriceRows;
                taimyrScrapper.DownloadProducts();
            }
            catch (Exception ex)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("Ошибка");

                while (ex != null)
                {
                    sb.AppendLine(ex.Message);
                    ex = ex.InnerException;
                }
                var msg = sb.ToString();
                WriteOutputAsync(msg);
            }
        }
Esempio n. 2
0
        private void RefreshSupliers()
        {
            Splash.Show();

            try
            {
                var taimyrScrapper = new TaimyrScrapper();

                taimyrScrapper.Output = Splash.WriteLine;

                taimyrScrapper.DownloadProducts();
            }
            catch (Exception ex)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("Ошибка");

                while (ex != null)
                {
                    sb.AppendLine(ex.Message);
                    ex = ex.InnerException;
                }

                Splash.Close();

                var msg = sb.ToString();

                MessageBox.Show(msg, "Ошибка загрузки поставок", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Splash.Close();
        }