private void backgroundJobHitsDataGrid_DoWork(object sender, DoWorkEventArgs e) { try { string par = e.Argument.ToString(); string[] items = par.Split(new char[] { ';' }); LogDataFacade facade = new LogDataFacade(_guid); if (items[0] == "Hits per Day") { _listHits3 = new List <DumpData>(facade.GetHitsByParams(Convert.ToInt32(items[1]))); } if (items[0] == "Hits per Month") { _listHits3 = new List <DumpData>(facade.GetMonthHitsByParams(Convert.ToInt32(items[1]))); } } catch (Exception err) { Logger.Write(err.Message); Logger.Write(err.StackTrace); System.Diagnostics.Debug.WriteLine(err.Message); } }
private void backgroundJobHitsMonth_DoWork(object sender, DoWorkEventArgs e) { try { string par = e.Argument.ToString(); LogDataFacade facade = new LogDataFacade(_guid); _listHits2 = new List <DumpData>(facade.GetMonthHitsByParams(Convert.ToInt32(par))); } catch (Exception err) { Logger.Write(err.Message); Logger.Write(err.StackTrace); System.Diagnostics.Debug.WriteLine(err.Message); } }