garant/Controleur/ControleurAjaxlisteadherents.php
2025-12-05 10:57:03 +00:00

39 lines
1.1 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Adherent.php';
class ControleurAjaxlisteadherents extends Controleur
{
private $adh;
public function __construct() {
$this->adh = new Adherent();
}
public function index()
{
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
$idPolice = $this->requete->getParametreFormulaire("idPolice");
$nomAdherent = $this->requete->getParametreFormulaire("nomAdherent");
$etatAdherent = $this->requete->getParametreFormulaire("etatAdherent");
$listeadherents = $this->adh->getListeAdherents($codeGcAssureur, $idPolice, $nomAdherent, $etatAdherent) ;
$nbreAdherent = count($listeadherents);
$_SESSION["idPolice_C"] = $idPolice;
$_SESSION['idPoliceAjax'] = $idPolice;
$adherents = json_encode($listeadherents,JSON_NUMERIC_CHECK);
$this->genererVueAjax(array('adherents' => $adherents, 'nbreAdherent' => $nbreAdherent));
}
public function desactiver()
{
$idGarant = $this->requete->getParametreFormulaire("idGarant");
$this->gc->desactivergarant($idGarant) ;
}
}