//public string UserSession { get; set; }
        public void Enregistrer(ClsMonitoring mon)
        {
            if (ImplementeConnexion.Instance.Conn.State == ConnectionState.Closed)
            {
                ImplementeConnexion.Instance.Conn.Open();
            }
            using (IDbCommand cmd = ImplementeConnexion.Instance.Conn.CreateCommand())
            {
                cmd.CommandText = "INSERT_MONITORING";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@operation", 50, DbType.String, mon.Operation));
                cmd.Parameters.Add(Parametre.Instance.AddParametres(cmd, "@refagent", 5, DbType.Int32, UserSession.GetInstance().Id));

                cmd.ExecuteNonQuery();
            }
        }
        private ClsMonitoring GetMonitoring(IDataReader dr)
        {
            ClsMonitoring mon = new ClsMonitoring();

            i = i + 1;

            mon.Num           = i;
            mon.Id            = Convert.ToInt32(dr["Id"].ToString());
            mon.DateHeure     = Convert.ToDateTime(dr["Date_Heure"].ToString());
            mon.DateOperation = Convert.ToDateTime(dr["Date_Operation"].ToString());
            mon.Operation     = dr["Operation"].ToString();
            mon.Ref_Agent     = Convert.ToInt32(dr["idagent"].ToString());
            mon.Noms          = dr["Noms"].ToString();
            mon.Fonction      = dr["Fonction"].ToString();

            return(mon);
        }