menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Modifierprofil'); $this->profil = new Profil(); $this->profilsysteme = new ProfilSysteme(); } public function index() { $id = $this->requete->getParametre("id"); $profil = $this->profil->getProfil($id); $profilsysteme = $this->profilsysteme->getListe(); $this->genererVue(array('profil' => $profil, 'profilsysteme' => $profilsysteme)); } public function reafficher() { $this->genererVue(); } public function modifier() { $id = $this->requete->getParametre("idprofil"); $oldcodeType = $this->requete->getParametre("oldcodeProfil"); $codeProfil = $this->requete->getParametre("codeProfil"); $libelle = $this->requete->getParametre("libelle"); $codeProfilSysteme= $this->requete->getParametre("codeProfilSysteme"); // Début contrôle doublon $doublon = false; $doublon = (($codeProfil!=$oldcodeType) && ($this->profil->existeligne($codeProfil))); if (!$doublon) { $this->profil->modifier($id, $codeProfil, $libelle, $codeProfilSysteme); } $this->rediriger("Listeprofil"); // Fin contrôle doublon } }