Esempio n. 1
0
        private void ProccessReverso()
        {
            var service = new WebService.WebServiceReverso(txtUrlReverso.Text.Trim());
            var dataAccess = new DataAccess();
            var dataSet = dataAccess.GetDataTableToProcessReverso();
            inicio = DateTime.Now;
            var dataReader = dataSet.Tables[0].CreateDataReader();
            var count = 1;
            backgroundWorker2.WorkerReportsProgress = true;

            while (dataReader.Read())
            {
                try
                {
                    backgroundWorker2.ReportProgress(percentReverso(count));
                    //var result = service.GetResult(dataReader, rbdXMLReverso.Checked ? "XML" : "JSON");
                    var result = service.GetResult(dataReader, "JSON");
                    dataAccess.UpdateReverso(dataReader, result);
                    count++;
                }
                catch (SystemException ex)
                {
                    continue;
                }
            }
        }
Esempio n. 2
0
        private void FillInfo()
        {
            DataAccess dataAccess = new DataAccess();
            lblNumTeste.Text = dataAccess.GetCountAllRows().ToString();
            lblProcessados.Text = dataAccess.GetCountRowsToProcess().ToString();

            lblProcessadosReverso.Text = dataAccess.GetCountRowsToProcessReverso().ToString();
            lblNumTesteReverso.Text = dataAccess.GetCountAllRowsReverso().ToString();
        }