menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuTbajout('bureau'); $this->bureau = new bureau(); } public function index() { $id = $this->requete->getParametre("id"); $bureau = $this->bureau->getBureau($id); $this->genererVue(array('bureau' => $bureau)); } public function reafficher() { $this->genererVue(); } public function modifier() { $id = $this->requete->getParametre("idbureau"); $oldcodeBureau = $this->requete->getParametre("oldcodeBureau"); $codeBureau = $this->requete->getParametre("codeBureau"); $libelle = $this->requete->getParametre("libelle"); $nomRespon = $this->requete->getParametre("nomRespon"); $prenomRespon = $this->requete->getParametre("prenomRespon"); $telephoneFixe = $this->requete->getParametre("telephoneFixe"); $telephonePortable = $this->requete->getParametre("telephonePortable"); $email = $this->requete->getParametre("email"); // Début contrôle doublon $doublon = false; $doublon = (($codeBureau!=$oldcodeBureau) && ($this->bureau->existeligne($codeBureau))); if (!$doublon) { $codeBureau = strtoupper($codeBureau); $libelle = ucfirst($libelle); $nomRespon = strtoupper($nomRespon); $prenomRespon = ucwords($prenomRespon); $this->bureau->modifier($id, $codeBureau, $libelle, $nomRespon, $prenomRespon, $telephoneFixe, $telephonePortable, $email); } // Fin contrôle doublon $this->rediriger("Tblistebureau"); } }