public void Init() { CurrentParameter = GetParameter(); CurrentSession = StatisticSession(); CurrentProcess = StatisticProcess(); TotalSession = TotalStatisticSession(); TotalProcess = TotalStatisticProcess(); _monitorDB = new MONITOR_DB(this.config); //CurrentMONITOR_DB = QueryMONITOR_DB(); }
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); }
public void LogTotalProcessDB() { TotalProcess = TotalStatisticProcess(); _monitorDB.LogTotalProcessDB(TotalProcess); }
public void LogTotalProcessDB(DBProcess TotalProcess) { string sqlString = SqlMonitorDB(TotalProcess); DAO.oracleCmdSP(this.config, sqlString); }