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

40 lines
1.4 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Tabtitre.php';
class ControleurAjaxtbmodifiertitre extends Controleur {
private $titre;
public function __construct() {
$this->titre = new Tabtitre();
}
public function index() {
$id = $this->requete->getParametreFormulaire("id");
$titre = $this->titre->gettitre($id);
$typepersonne = $this->titre->getTypePersonne();
$this->genererVueAjax(array(
'titre' => $titre,
'typepersonne' => $typepersonne
));
}
public function modifier(){
$id = $this->requete->getParametreFormulaire("id");
$codeTitre = strtoupper($this->requete->getParametreFormulaire("codeTitre"));
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
$libelleEng = strtoupper($this->requete->getParametreFormulaire("libelleEng"));
$titreCourrier = strtoupper($this->requete->getParametreFormulaire("titreCourrier"));
$titreCourrierEng = strtoupper($this->requete->getParametreFormulaire("titreCourrierEng"));
$codeTypePersonne = $this->requete->getParametreFormulaire("codeTypePersonne");
$this->titre->modifiertitre($codeTitre,$libelle,$libelleEng,$titreCourrier,$titreCourrierEng,$codeTypePersonne,$id);
}
}