Example #1
0
        //---------------------------------------------------------------
        private void m_lnkAddQuery_LinkClicked(object sender, EventArgs e)
        {
            CEasyQuery query = new CEasyQuery();

            if (EditeQuery(query))
            {
                m_baseHandlers.AddQuery(query);
                FillListeQueries();
            }
        }
Example #2
0
        /// /////////////////////////////////////////////////////////
        public CTypeAgentPourSupervision GetTypeAgentPourSupervision(CMemoryDb database)
        {
            if (database == null)
            {
                database = CMemoryDbPourSupervision.GetMemoryDb(ContexteDonnee);
            }
            CTypeAgentPourSupervision typeAgent = new CTypeAgentPourSupervision(database);

            if (!typeAgent.ReadIfExist(Id.ToString(), false))
            {
                typeAgent.CreateNew(Id.ToString());
            }
            else
            if (!typeAgent.IsToRead())
            {
                return(typeAgent);
            }
            typeAgent.Row[CMemoryDb.c_champIsToRead] = false;
            foreach (CEasyQuery query in Queries)
            {
                typeAgent.AddQuery(query);
            }
            typeAgent.Fonctions = FonctionsDynamiques;
            foreach (CTrapHandler handler in TrapHandlers)
            {
                database.ImporteObjet(handler, true, false);
            }
            foreach (CTypeEntiteSnmp typeEntite in TypesEntites)
            {
                if (typeEntite.TypeParent == null)
                {
                    typeEntite.GetTypeEntitePourSupervision(database, true);
                }
            }
            foreach (CAgentFinderFromKey finder in AgentFinders)
            {
                database.ImporteObjet(finder, true, false);
            }
            return(typeAgent);
        }