production/Controleur/ControleurAjaxtbajoutermotifecxlusionprestation.php
2025-12-02 11:29:44 +00:00

36 lines
867 B
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Tabmotifecxlusionprestation.php';
class ControleurAjaxtbajoutermotifecxlusionprestation extends Controleur {
private $motif;
public function __construct() {
$this->motif = new Tabmotifecxlusionprestation();
}
public function index() {
$this->genererVueAjax();
}
public function ajouter(){
$libelle = $this->requete->getParametreFormulaire("libelle");
$libelleEng = $this->requete->getParametreFormulaire("libelleEng");
$maxId = $this->motif->maxId()+1;
if ($maxId < "0" && $maxId < "9"){
$codeMotifExclusion = "0".$maxId;
}else{
$codeMotifExclusion = $maxId;
}
$this->motif->ajoutermotifexclusionprestation($codeMotifExclusion,$libelle,$libelleEng);
}
}