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); } }