コード例 #1
0
        public string Execute(string argument)
        {
            PerformanceStatisticRepository pStatisticRepo = new PerformanceStatisticRepository();
            SystemEventLogRepository sysEventLog = new SystemEventLogRepository();
            FlushData arg=JSONhelper.GetObject<FlushData>(argument);

            try
            {
                int daysAgoPerformance = Convert.ToInt32(arg.PerformanceStatisticDays);
                DateTime dtPerformance = pStatisticRepo.GetMaxCreationDate();
                dtPerformance = dtPerformance.AddDays(-daysAgoPerformance);
                pStatisticRepo.FlushPerformanceStatistic(dtPerformance);

                int daysAgoSystemEvent = Convert.ToInt32(arg.SystemEventLogDays);
                DateTime dtSystemEvt = sysEventLog.GetMaxCreationDate();
                dtSystemEvt = dtSystemEvt.AddDays(-daysAgoSystemEvent);
                sysEventLog.FlushSystemEventLog(dtSystemEvt);

                return "Success";
            }
            catch (Exception exp)
            {
                return "Error";
            }
        }
コード例 #2
0
 public SystemEventLogService()
 {
     _iSystemEventLogRepository = new SystemEventLogRepository();
 }