menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuTbajout('bureau'); $this->bureau = new bureau(); } public function index() { $this->genererVue(); } public function ajouter() { $codeSociete = $this->requete->getSession()->getAttribut('codeSociete'); $codeBureau = $this->requete->getParametre("codeBureau"); // Début contrôle doublon if (!$this->bureau->existeligne($codeBureau)) { $libelle = $this->requete->getParametre("libelle"); $nomRespon = $this->requete->getParametreFormulaire("nomRespon"); $prenomRespon = $this->requete->getParametreFormulaire("prenomRespon"); $telephoneFixe = $this->requete->getParametreFormulaire("telephoneFixe"); $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); $email = $this->requete->getParametreFormulaire("email"); $codeBureau = strtoupper($codeBureau); $libelle = ucfirst($libelle); $nomRespon = strtoupper($nomRespon); $prenomRespon = ucwords($prenomRespon); $this->bureau->ajouter($codeSociete, $codeBureau, $libelle, $nomRespon, $prenomRespon, $telephoneFixe, $telephonePortable, $email); $this->executerAction("index"); } else $this->genererVue(array('msgErreur' => 'Ce code existe déjà!'), "index"); // Fin contrôle doublon } }