60 lines
1.5 KiB
PHP
Executable File
60 lines
1.5 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Police.php';
|
|
|
|
class ControleurAjaxfiltregarantiecollegeretrait extends Controleur
|
|
{
|
|
private $police;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->police = new Police();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idCollegePolice = $this->requete->getParametreFormulaire("idCollegePolice");
|
|
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
$collegesPolice = $this->police->getListeCollegePolice($idPolice);
|
|
|
|
$garanties_out = $this->police->getgarantieoutretrait($idCollegePolice);
|
|
|
|
$garanties_in = $this->police->getgarantieinretrait($idCollegePolice);
|
|
|
|
|
|
$_SESSION["idCollegePolice"] = $idCollegePolice;
|
|
|
|
$nombreGarantie = $this->police->getNombreGarantie();
|
|
|
|
$this->genererVueAjax(array(
|
|
'garanties_out' => $garanties_out,
|
|
'collegesPolice' => $collegesPolice,
|
|
'garanties_in' => $garanties_in,
|
|
'nombreGarantie' => $nombreGarantie
|
|
));
|
|
}
|
|
|
|
public function retirer()
|
|
{
|
|
$idCollegePolice = $this->requete->getParametreFormulaire("idCollegePolice");
|
|
$codeGarantie = $this->requete->getParametreFormulaire("codeGarantie");
|
|
|
|
$this->police->retirergarantie($idCollegePolice, $codeGarantie);
|
|
}
|
|
|
|
public function annuler()
|
|
{
|
|
$idGarantie = $this->requete->getParametreFormulaire("idGarantie");
|
|
|
|
$this->police->annulergarantieretrait($idGarantie);
|
|
}
|
|
|
|
public function enregistrer()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
|
|
$this->police->enregistrerretraitgarantie($idPolice);
|
|
}
|
|
}
|