35 lines
1009 B
PHP
Executable File
35 lines
1009 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");
|
|
$codeTypeGarant = strtoupper($this->requete->getParametreFormulaire("codeTypeGarant"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
|
|
if(empty($codeTypeGarant) && empty($libelle)){
|
|
die();
|
|
}
|
|
|
|
$this->type->modifierTypeGarant($codeTypeGarant,$libelle,$id);
|
|
|
|
}
|
|
}
|
|
|
|
|