38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Typebon.php';
|
|
|
|
class ControleurAjaxparambons extends Controleur {
|
|
private $typebon;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->typebon = new Typebon();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idTypebon = $this->requete->getParametre("idTypebon");
|
|
|
|
$typebon = $this->typebon->getUnTypebon($idTypebon);
|
|
|
|
$typegestion = $this->typebon->getListeGestion();
|
|
|
|
$this->genererVueAjax(array('typebon' => $typebon, 'typegestion' => $typegestion));
|
|
}
|
|
|
|
public function enregistrermodif()
|
|
{
|
|
$idTypebon = $this->requete->getParametre("idTypebon");
|
|
$dureeVie = $this->requete->getParametreFormulaire("dureeVie","numerique");
|
|
$codeGestionBon = $this->requete->getParametre("codeGestionBon");
|
|
|
|
// echo "idTypebon => $idTypebon ; dureeVie => $dureeVie ; codeGestionBon => $codeGestionBon";
|
|
// exit();
|
|
|
|
$this->typebon->enregistrermodif($idTypebon, $dureeVie, $codeGestionBon);
|
|
|
|
// $this->genererVueAjax();
|
|
}
|
|
|
|
} |