menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuTbajout('service'); $this->service = new service(); } public function index() { $id = $this->requete->getParametre("id"); $service = $this->service->getservice($id); $this->genererVue(array('service' => $service)); } public function reafficher() { $this->genererVue(); } public function modifier() { $id = $this->requete->getParametre("idservice"); $oldcodeService = $this->requete->getParametre("oldcodeService"); $codeService = $this->requete->getParametre("codeService"); $libelle = $this->requete->getParametre("libelle"); // Début contrôle doublon $doublon = false; $doublon = (($codeService!=$oldcodeService) && ($this->service->existeligne($codeService))); if (!$doublon) { $codeService = strtoupper($codeService); $libelle = ucfirst($libelle); $this->service->modifier($id, $codeService, $libelle); } $this->rediriger("Tblisteservice"); // Fin contrôle doublon } }