Example #1
0
 public void Init()
 {
     CurrentParameter = GetParameter();
     CurrentSession   = StatisticSession();
     CurrentProcess   = StatisticProcess();
     TotalSession     = TotalStatisticSession();
     TotalProcess     = TotalStatisticProcess();
     _monitorDB       = new MONITOR_DB(this.config);
     //CurrentMONITOR_DB = QueryMONITOR_DB();
 }
Example #2
0
        public DBProcess TotalStatisticProcess()
        {
            TotalProcess = CurrentProcess.GroupBy(x => new { x.Type }).Select(g =>
                                                                              new DBProcess()
            {
                Id        = g.FirstOrDefault().Id,
                Type      = g.Key.Type,
                Name      = "@Total",
                NameValue = g.Sum(y => y.NameValue),
                Percent   = (100 * g.Sum(y => y.NameValue) / ParameterProcessValue),
                Cdt       = DateTime.Now
            }
                                                                              ).FirstOrDefault();

            return(TotalProcess);
        }
Example #3
0
 public void LogTotalProcessDB()
 {
     TotalProcess = TotalStatisticProcess();
     _monitorDB.LogTotalProcessDB(TotalProcess);
 }
Example #4
0
        public void LogTotalProcessDB(DBProcess TotalProcess)
        {
            string sqlString = SqlMonitorDB(TotalProcess);

            DAO.oracleCmdSP(this.config, sqlString);
        }