//-------------------------------------------------------------- public void PrepareEditingControlForEdit(bool selectAll) { try { m_wndEdition.SetElementEdite(ElementEdite); if (m_createurFormulaires != null && m_wndEdition != null && m_wndEdition.Control != null) { m_createurFormulaires.UpdateVisibilityEtEnable(m_wndEdition, ElementEdite); } if (m_listeRestrictions != null && ElementEdite != null) { CRestrictionUtilisateurSurType rest = m_listeRestrictions.GetRestriction(ElementEdite.GetType()); if (rest != null) { rest.ApplyToObjet(ElementEdite); m_wndEdition.AppliqueRestriction(rest, m_listeRestrictions, new CGestionnaireReadOnlySysteme()); } } m_wndEdition.SelectAll(); } catch { } }
//----------------------------------------------- public void AppliqueRestrictions( CListeRestrictionsUtilisateurSurType restrictions, IGestionnaireReadOnlySysteme gestionnaireReadOnly) { if (ElementEdite != null) { CRestrictionUtilisateurSurType restriction = restrictions.GetRestriction(ElementEdite.GetType()); restriction.ApplyToObjet(ElementEdite); foreach (IControleWndFor2iWnd ctrl in m_controlesPrincipaux) { ctrl.AppliqueRestriction( restriction, restrictions, gestionnaireReadOnly); } } }