prestation/Controleur/ControleurAjaxmodifiertypegarant.php
2025-12-01 18:54:33 +00:00

35 lines
1009 B
PHP

<?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");
$codeTypeGarant = strtoupper($this->requete->getParametreFormulaire("codeTypeGarant"));
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
if(empty($codeTypeGarant) && empty($libelle)){
die();
}
$this->type->modifierTypeGarant($codeTypeGarant,$libelle,$id);
}
}