adherent = new Adherent(); $this->naturepiece = (new Naturepiece())->getListe(); $this->sexe = (new Sexe())->getListe(); $this->situationfamille = (new Situationfamille())->getListe(); $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']); $this->groupesanguin = (new Groupesanguin())->getListe(); $this->garantieadherent = new Garantieadherent(); } public function index() { // $this->genererVueAjax(); } public function init() { $idPolice = $_SESSION['idPolice_C']; $idAdherent = $_SESSION['idAdherent_C']; $dateSortie = $this->requete->getParametreDate("dateSortie"); $dateRemplacement = $this->requete->getParametreDate("dateRemplacement"); $user = $_SESSION['login']; $motifavenant = $this->requete->getParametreFormulaire("motifavenant"); $fraisCarte = $this->requete->getParametreFormulaire("fraisCarte","numerique"); $this->adherent->initremplacementadherent($idPolice, $idAdherent, $dateSortie , $dateRemplacement, $user, $motifavenant, $fraisCarte); $remplacementadherent_temp = $this->adherent->getremplacementadherent_temp(); $spadherent = $this->adherent->getRapportSpAdherent($idAdherent, $dateSortie); $beneficiairearemplacers = $this->adherent->getbeneficiairearemplacer(); $adherentremplacanttemp = $this->adherent->getadherentremplacanttemp(); $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); $this->genererVueAjax(array('spadherent' => $spadherent, 'beneficiairearemplacers' => $beneficiairearemplacers, 'adherentremplacanttemp' => $adherentremplacanttemp, 'naturepiece' => $this->naturepiece, 'sexe' => $this->sexe, 'pays' => $this->pays, 'situationfamille' => $this->situationfamille, 'groupesanguin' => $this->groupesanguin, 'remplacementadherent_temp' => $remplacementadherent_temp, 'garantieadherents' => $garantieadherents)); } public function enregistrerremplacementadherent() { $nom = $this->requete->getParametre("nom"); $prenoms = $this->requete->getParametreFormulaire("prenoms"); $codeNaturePiece = $this->requete->getParametre("codeNaturePiece"); $numeroPiece = $this->requete->getParametreFormulaire("numeroPiece"); $sexe = $this->requete->getParametreFormulaire("sexe"); $dateNaissance = $this->requete->getParametreDate("dateNaissance"); $codeGroupeSanguin = $this->requete->getParametreFormulaire("codeGroupeSanguin"); $codeSituationFamille = $this->requete->getParametreFormulaire("codeSituationFamille"); $nombreEnfants = $this->requete->getParametreFormulaire("nombreEnfants"); $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); $adressePostale = $this->requete->getParametreFormulaire("adressePostale"); $codePays = $this->requete->getParametre("codePays"); $telephonFixe = $this->requete->getParametreFormulaire("telephonFixe"); $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); $email = $this->requete->getParametreFormulaire("email"); $fraisCarte = $this->requete->getParametreFormulaire("fraisCarte","numerique"); $nom = strtoupper($nom); $prenoms = ucwords($prenoms); $this->adherent->enregistrerremplacementadherent($nom, $prenoms, $codeNaturePiece, $numeroPiece, $sexe, $dateNaissance, $codeGroupeSanguin, $codeSituationFamille, $nombreEnfants, $adresseGeo, $adressePostale, $codePays, $telephonFixe, $telephonePortable, $email, $fraisCarte) ; // $this->genererVueAjax(); } }