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