//--------------------------------------------------------------------------
 private void m_radioPropre_CheckedChanged(object sender, EventArgs e)
 {
     if (m_radioPropre.Checked)
     {
         if (!m_gestionnaireModeEdition.ModeEdition || m_bIsInitializing)
         {
             return;
         }
         m_occupationPropre = m_objetEdite.OccupationCoordonneesPropre;
         if (m_occupationPropre == null)
         {
             IObjetAOccupation donnateur = m_objetEdite.DonnateurOccupationCoordonneeHerite;
             if (donnateur != null)
             {
                 m_occupationPropre = donnateur.OccupationCoordonneesPropre;
             }
             if (m_occupationPropre == null)
             {
                 m_occupationPropre = new COccupationCoordonnees(0, null);
             }
         }
         Init(m_occupationPropre);
         if (OnChangeOccupation != null)
         {
             OnChangeOccupation(this, new EventArgs());
         }
     }
 }
        public CResultAErreur Init(IObjetAOccupation objet)
        {
            CResultAErreur result = CResultAErreur.True;

            if (objet == null)
            {
                Visible = false;
                return(result);
            }
            m_objetEdite            = objet;
            m_panelHeritage.Visible = true;
            if (!objet.CanHeriteOccupationCoordonnees)
            {
                m_radioHerite.Text = I.T("No occupation|522");
            }
            else
            {
                m_radioHerite.Text = I.T("Inherits occupation|527");
            }

            m_cmbUnite.Init(
                typeof(CUniteCoordonnee),
                "Libelle",
                true);

            m_occupationPropre    = objet.OccupationCoordonneesPropre;
            m_bIsInitializing     = true;
            m_radioHerite.Checked = m_occupationPropre == null;
            m_radioPropre.Checked = m_occupationPropre != null;
            m_bIsInitializing     = false;

            /*if (!objet.CanHeriteOccupationCoordonnees &&
             *      objet.OccupationCoordonneesPropre == null)
             *      m_radioPropre.Checked = true;*/

            COccupationCoordonnees occupation = objet.OccupationCoordonneeAppliquee;

            result = Init(occupation);

            return(result);
        }
 //--------------------------------------------------------------------------
 private void m_radioHerite_CheckedChanged(object sender, EventArgs e)
 {
     if (m_radioHerite.Checked)
     {
         if (!m_gestionnaireModeEdition.ModeEdition || m_bIsInitializing)
         {
             return;
         }
         IObjetAOccupation donnataire = m_objetEdite.DonnateurOccupationCoordonneeHerite;
         if (donnataire != null && m_objetEdite.CanHeriteOccupationCoordonnees)
         {
             Init(donnataire.OccupationCoordonneesPropre);
         }
         else
         {
             Init((COccupationCoordonnees)null);
         }
         if (OnChangeOccupation != null)
         {
             OnChangeOccupation(this, new EventArgs());
         }
     }
 }