private void reconSchedulerMethod(object sender, EventArgs e) { if (ICEDownloaderSwitch.Value == 1) { var a = new HTMLParser(@"C:\Users\Akhand\Documents\Visual Studio 2015\Projects\ExchangeRecon\ExchangeRecon\AppFiles\Download Data\ICE_CBNA.xls").Process().ToList(); var b = new HTMLParser(@"C:\Users\Akhand\Documents\Visual Studio 2015\Projects\ExchangeRecon\ExchangeRecon\AppFiles\Download Data\ICE_CGML.xls").Process().ToList(); foreach (DataTable t in b) { a.Add(t); } Console.WriteLine("Num of tables extracted : " + a.Count); var data = new DataTable("ICE Data"); MergeTables(a, data); AddPKtoICE(data); ICEqueues["ICE Raw Collated"].QData = data; ICEqueues["ICE Raw Collated"].ToCSV(); } Console.WriteLine("Chal gaya hu"); ICEReconTimer.Stop(); if (ReconSwitch.Value == 1) { ICEReconStatus.Content = "Running"; // Add the Recon Method ReconQueue comparisons = ICEqueues["Comparisons"]; foreach (DataRow comp in comparisons.QData.Rows) { queryTrials(comp, ICEqueues); } Console.WriteLine("Analysis done"); foreach (KeyValuePair <string, ReconQueue> q in ICEqueues) { q.Value.ToCSV(); } DateTime now = TimeZoneInfo.ConvertTimeFromUtc(System.DateTime.UtcNow, TimeZoneInfo.Local); ICEReconStatus.Content = "Last executed at " + now.ToString("dd-mmm-yy hh:mm:ss"); } }