prestation/Controleur/ControleurAjaxtbmodifiercommerciaux.php
2025-12-01 18:54:33 +00:00

47 lines
2.0 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Tabcommerciaux.php';
class ControleurAjaxtbmodifiercommerciaux extends Controleur {
private $commer;
public function __construct() {
$this->commer = new Tabcommerciaux();
}
public function index() {
$id = $this->requete->getParametreFormulaire("id");
$commer = $this->commer->getcommerciaux($id);
$bureau = $this->commer->getBureaucommerciaux();
$typeapp = $this->commer->getTypecommerciaux();
$this->genererVueAjax(array(
'commerciaux' => $commer,
'bureau' => $bureau,
'typeapp' => $typeapp
));
}
public function modifier(){
$id = $this->requete->getParametreFormulaire("id");
$codeApporteur = strtoupper($this->requete->getParametreFormulaire("codeApporteur"));
$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");
$this->commer->modifiercommerciaux($codeApporteur,$codeTypeApporteur,$libelle,$telephone,$email,$adresseGeo,
$adressePost,$nomResponsable,$codeBureau,$deduireComm,$typeSysteme,$id);
}
}