Exemplo n.º 1
0
        //-------------------------------------------------------------
        public CLocalCategorieMasquageAlarme GetLocalCategorieForSupervision(CMemoryDb database)
        {
            if (database == null)
            {
                database = CMemoryDbPourSupervision.GetMemoryDb(ContexteDonnee);
            }

            CLocalCategorieMasquageAlarme categorie = new CLocalCategorieMasquageAlarme(database);

            if (!categorie.ReadIfExist(Id.ToString(), false))
            {
                categorie.CreateNew(Id.ToString());
            }
            else
            if (!categorie.IsToRead())
            {
                return(categorie);
            }
            categorie.Row[CMemoryDb.c_champIsToRead] = false;
            categorie.Libelle  = Libelle;
            categorie.Code     = Code;
            categorie.Priorite = Priorite;


            return(categorie);
        }