Example #1
0
 /////////////////////////////////////////////////////////////
 public void CompleteRestrictions(CRestrictionUtilisateurSurType restriction)
 {
     AssureRelations();
     if (!restriction.HasRestrictions)
     {
         return;
     }
     foreach (CInfoChampTable info in m_listeChamps)
     {
         if (!restriction.CanModify(info.Propriete))
         {
             info.ReadOnly = true;
         }
     }
     foreach (CInfoRelation relation in m_listeRelationsParentes)
     {
         if (!restriction.CanModify(relation.Propriete))
         {
             foreach (CInfoChampTable info in m_listeChamps)
             {
                 foreach (string strChamp in relation.ChampsFille)
                 {
                     if (info.NomChamp == strChamp)
                     {
                         info.ReadOnly = true;
                     }
                 }
             }
         }
     }
 }