production/Controleur/ControleurAjaxlimiteadherent.php
2025-12-02 11:29:44 +00:00

45 lines
1.3 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Adherent.php';
class ControleurAjaxlimiteadherent extends Controleur {
private $adherent;
public function __construct() {
$this->adherent = new Adherent();
}
public function index() {
$idAdherent = $this->requete->getParametreFormulaire("idAdherent");
$limites = $this->adherent->getListeLimiteAdherent($idAdherent);
$this->genererVueAjax(array('limites' => $limites));
}
public function majplafond()
{
$idLimite = $this->requete->getParametreFormulaire("idLimite");
$plafond = $this->requete->getParametreFormulaire("plafond", "numerique");
$motif = $this->requete->getParametreFormulaire("motif");
$idAdherent = $this->requete->getParametreFormulaire("idAdherent");
$this->adherent->majPlafondAdherent($idLimite, $plafond, $motif);
$limites = $this->adherent->getListeLimiteAdherent($idAdherent);
$this->genererVueAjax(array('limites' => $limites));
}
public function modifierlimite()
{
$idLimite = $this->requete->getParametreFormulaire("idLimite");
$plafondOld = $this->requete->getParametreFormulaire("plafondOld");
$this->genererVueAjax(array('idLimite' => $idLimite, 'plafondOld' => $plafondOld));
}
}