newdesigngestionnaire/Controleur/ControleurAjaxmodifiertypegarant.php

33 lines
822 B
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Gestionconfiee.php';
class ControleurAjaxmodifiertypegarant extends Controleur {
private $type;
public function __construct() {
$this->type = new Gestionconfiee();
}
public function index(){
$id = $this->requete->getParametreFormulaire("id");
$gctypegarant = $this->type->getGcTypeGarantId($id);
$this->genererVueAjax(array(
'gc_typegarant' => $gctypegarant
));
}
public function enregistrer(){
$id = $this->requete->getParametreFormulaire("id");
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
$this->type->modifierTypeGarant($libelle, $id);
}
}