//---------------------------------------------
        public CRelationElement_RestrictionSpecifique_Application GetRelationFor(
            IElementDonnantDesRestrictions elementDonnantDesRestrictions)
        {
            CListeObjetsDonnees lst = Applications;

            lst.InterditLectureInDB = true;

            if (elementDonnantDesRestrictions is CActeur)
            {
                lst.Filtre = new CFiltreData(CActeur.c_champId + "=@1",
                                             elementDonnantDesRestrictions.Id);
            }
            if (elementDonnantDesRestrictions is CProfilUtilisateur)
            {
                lst.Filtre = new CFiltreData(CProfilUtilisateur.c_champId + "=@1",
                                             elementDonnantDesRestrictions.Id);
            }
            if (elementDonnantDesRestrictions is CGroupeActeur)
            {
                lst.Filtre = new CFiltreData(CGroupeActeur.c_champId + "=@1",
                                             elementDonnantDesRestrictions.Id);
            }
            if (lst.Count > 0)
            {
                return(lst[0] as CRelationElement_RestrictionSpecifique_Application);
            }
            return(null);
        }
        //---------------------------------------------------------------------------------------------
        public static void RemoveRestrictionForElementDonnantDesRestrictions(
            IElementARestrictionsSpecifiques elt,
            CGroupeRestrictionSurType groupe,
            IElementDonnantDesRestrictions elementDonnantDesRestrictions)
        {
            CRelationElement_RestrictionSpecifique rel = GetRelationForGroupeRestriction(elt, groupe);

            if (rel != null)
            {
                CRelationElement_RestrictionSpecifique_Application app = rel.GetRelationFor(elementDonnantDesRestrictions);
                if (app != null)
                {
                    app.Delete(true);
                }
            }
        }
        //---------------------------------------------------------------------------------------------
        public static void AddRestrictionForElementDonnantDesRestrictions(
            IElementARestrictionsSpecifiques elt,
            CGroupeRestrictionSurType groupe,
            IElementDonnantDesRestrictions elementDonnantDesRestrictions)
        {
            CRelationElement_RestrictionSpecifique rel = GetRelationForGroupeRestriction(elt, groupe);

            if (rel == null)
            {
                rel = new CRelationElement_RestrictionSpecifique(elt.ContexteDonnee);
                rel.CreateNewInCurrentContexte();
                rel.ElementLie        = elt as CObjetDonneeAIdNumerique;
                rel.GroupeRestriction = groupe;
            }
            CRelationElement_RestrictionSpecifique_Application app = rel.GetRelationFor(elementDonnantDesRestrictions);

            if (app == null)
            {
                app = new CRelationElement_RestrictionSpecifique_Application(elt.ContexteDonnee);
                app.CreateNewInCurrentContexte();
                app.RelationElement_Restriction = rel;
                app.ElementARestrictions        = elementDonnantDesRestrictions;
            }
        }