48 lines
2.1 KiB
PHP
Executable File
48 lines
2.1 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabcommerciaux.php';
|
|
require_once 'Modele/Ouinon.php';
|
|
|
|
class ControleurAjaxtbajoutercommerciaux extends Controleur {
|
|
private $commer;
|
|
|
|
public function __construct() {
|
|
$this->commer = new Tabcommerciaux();
|
|
$this->ouinonoptionnelle = (new Ouinon())->getListe();
|
|
$this->ouinonplafondmodifiable = (new Ouinon())->getListe();
|
|
}
|
|
|
|
public function index() {
|
|
$bureau = $this->commer->getBureaucommerciaux();
|
|
$typeapp = $this->commer->getTypecommerciaux();
|
|
|
|
$this->genererVueAjax(array(
|
|
'ouinonoptionnelle' => $this->ouinonoptionnelle,
|
|
'ouinonplafondmodifiable' => $this->ouinonplafondmodifiable,
|
|
'bureau' => $bureau,
|
|
'typeapp' => $typeapp
|
|
));
|
|
}
|
|
|
|
public function ajouter(){
|
|
|
|
$codeTypeApporteur = strtoupper($this->requete->getParametreFormulaire("codeTypeApporteur"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
$nomResponsable = strtoupper($this->requete->getParametreFormulaire("nomResponsable"));
|
|
$telephone = $this->requete->getParametreFormulaire("telephone");
|
|
$email = $this->requete->getParametreFormulaire("email");
|
|
$codeBureau = $this->requete->getParametreFormulaire("codeBureau");
|
|
$deduireComm = $this->requete->getParametreFormulaire("deduireComm");
|
|
$adressePost = strtoupper($this->requete->getParametreFormulaire("adressePost"));
|
|
$adresseGeo = strtoupper($this->requete->getParametreFormulaire("adresseGeo"));
|
|
$typeSysteme = $this->requete->getParametreFormulaire("typeSysteme");
|
|
|
|
$mobilePaiement = $this->requete->getParametreFormulaire("mobilePaiement","numerique");
|
|
|
|
$this->commer->ajoutercommerciaux($codeTypeApporteur,$libelle,$telephone,$email,$adresseGeo,
|
|
$adressePost,$nomResponsable,$codeBureau,$deduireComm,$typeSysteme,$mobilePaiement);
|
|
|
|
}
|
|
}
|
|
|
|
|