Beispiel #1
0
        private void backgroundReportJob_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                string        par    = e.Argument.ToString();
                LogDataFacade facade = new LogDataFacade(_guid);

                if (par.Contains("-"))
                {
                    string[] items = par.Split(new char[] { '-' });
                    int      month = IndihiangHelper.GetMonth(items[0]);
                    _listAgentData = facade.GetTotalPerUserAgentByParams(Convert.ToInt32(items[1]), month);
                }
                else
                {
                    _listAgentData = facade.GetTotalPerUserAgentByParams(Convert.ToInt32(par));
                }
            }
            catch (Exception err)
            {
                Logger.Write(err.Message);
                Logger.Write(err.StackTrace);

                System.Diagnostics.Debug.WriteLine(err.Message);
            }
        }
Beispiel #2
0
        private void backgroundJob_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                LogDataFacade facade = new LogDataFacade(_guid);
                _listPerAgent = facade.GetTotalPerUserAgent();
                //_listYears = facade.GetListyearLogFile();

                for (int i = 0; i < _listYears.Count; i++)
                {
                    List <string> list = facade.GetMonthLogFileListByYear(_listYears[i]);
                    for (int j = 0; j < list.Count; j++)
                    {
                        string monthYear = string.Format("{0}-{1}", IndihiangHelper.GetMonth(Convert.ToInt32(list[j])), _listYears[i]);
                        _listYearMonth.Add(monthYear);
                    }
                }
            }
            catch (Exception err)
            {
                Logger.Write(err.Message);
                Logger.Write(err.StackTrace);
                System.Diagnostics.Debug.WriteLine(err.Message);
            }
        }
Beispiel #3
0
        private void backgroundJobGrid_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                string   par   = e.Argument.ToString();
                string[] items = par.Split(new char[] { '-' });
                int      month = IndihiangHelper.GetMonth(items[0]);
                int      year  = Convert.ToInt32(items[1]);

                LogDataFacade facade = new LogDataFacade(_guid);
                _listAccessPage = new List <DumpData>(facade.GetAccessPageByYearMonth(year, month));
            }
            catch (Exception err)
            {
                Logger.Write(err.Message);
                Logger.Write(err.StackTrace);

                System.Diagnostics.Debug.WriteLine(err.Message);
            }
        }