/**
  * @name validInfoAjoutAdhesionAdherent($pData)
  * @return VR
  * @desc Test la validite de l'élément
  */
 public static function validInfoAjoutAdhesionAdherent($pData)
 {
     $lVr = AdhesionValid::validDelete($pData);
     if ($lVr->getValid()) {
         return AdherentValid::validAffiche($pData);
     }
     return $lVr;
 }
 /**
  * @name getAdherent($pParam)
  * return AfficheModificationAdherentResponse
  * @desc Retourne les informations pour l'adhérent.
  */
 public function getAdherent($pParam)
 {
     $lVr = AdherentValid::validAffiche($pParam);
     if ($lVr->getValid()) {
         $lIdAdherent = $pParam['id'];
         $lAdherentService = new AdherentService();
         $lResponse = new InfoCompteAdherentResponse();
         $lAdherent = $lAdherentService->get($lIdAdherent);
         $lResponse->setAdherent($lAdherent);
         $lResponse->setAutorisations($lAdherentService->getAutorisation($lIdAdherent));
         $lModuleService = new ModuleService();
         $lResponse->setModules($lModuleService->selectAllNonDefautVisible());
         $lCompteService = new CompteService();
         $lResponse->setAdherentCompte($lCompteService->getAdherentCompte($lAdherent->getAdhIdCompte()));
         return $lResponse;
     }
     return $lVr;
 }
 /**
  * @name afficher($pParam)
  * @return InfoCompteAdherentResponse
  * @desc Renvoie le Compte du controleur après avoir récupérer les informations dans la BDD en fonction de l'ID.
  */
 public function afficher($pParam)
 {
     $lVr = AdherentValid::validAffiche($pParam);
     if ($lVr->getValid()) {
         $lIdAdherent = $pParam['id'];
         $lAdherentService = new AdherentService();
         $lResponse = new InfoCompteAdherentResponse();
         $lAdherent = $lAdherentService->get($lIdAdherent);
         $lResponse->setAdherent($lAdherent);
         $lResponse->setAutorisations($lAdherentService->getAutorisation($lIdAdherent));
         $lResponse->setOperationAvenir($lAdherentService->getOperationAvenir($lIdAdherent));
         $lResponse->setOperationPassee($lAdherentService->getOperationPassee($lIdAdherent));
         $lModuleService = new ModuleService();
         $lResponse->setModules($lModuleService->selectAllNonDefautVisible());
         $lTypePaiementService = new TypePaiementService();
         $lResponse->setTypePaiement($lTypePaiementService->get());
         $lCompteService = new CompteService();
         $lResponse->setAdherentCompte($lCompteService->getAdherentCompte($lAdherent->getAdhIdCompte()));
         $lAdhesionService = new AdhesionService();
         $lResponse->setNbAdhesionEnCours($lAdhesionService->getNbAdhesionEnCoursSurAdherent($lIdAdherent));
         return $lResponse;
     }
     return $lVr;
 }
 /**
  * @name getAdhesionSurAdherent($pParam)
  * @return ListeAdherentResponse
  * @desc Recherche la liste des adherents
  */
 public function getAdhesionSurAdherent($pParam)
 {
     $lVr = AdherentValid::validAffiche($pParam);
     if ($lVr->getValid()) {
         $lAdhesionService = new AdhesionService();
         $lAdherentService = new AdherentService();
         return new ListeAdhesionAdherentResponse($lAdherentService->get($pParam['idAdherent']), $lAdhesionService->getAdhesionSurAdherent($pParam['idAdherent']));
     }
     return $lVr;
 }