menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuTbajout('typeaffection'); $this->typeaffection = new typeaffection(); } public function index() { $id = $this->requete->getParametre("id"); $typeaffection = $this->typeaffection->gettypeaffection($id); $this->genererVue(array('typeaffection' => $typeaffection)); } public function reafficher() { $this->genererVue(); } public function modifier() { $id = $this->requete->getParametre("idtypeaffection"); $oldcodeType = $this->requete->getParametre("oldcodeType"); $codeType = $this->requete->getParametre("codeType"); $libelle = $this->requete->getParametre("libelle"); // Début contrôle doublon $doublon = false; $doublon = (($codeType!=$oldcodeType) && ($this->typeaffection->existeligne($codeType))); if (!$doublon) { $codeType = strtoupper($codeType); $libelle = ucfirst($libelle); $this->typeaffection->modifier($id, $codeType, $libelle); } $this->rediriger("Tblistetypeaffection"); // Fin contrôle doublon } }