34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabservice.php';
|
|
|
|
class ControleurAjaxtbmodifierservice extends Controleur {
|
|
private $service;
|
|
|
|
public function __construct() {
|
|
$this->service = new Tabservice();
|
|
}
|
|
|
|
public function index() {
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
$tabservice = $this->service->getservice($id);
|
|
|
|
$this->genererVueAjax(array(
|
|
'service' => $tabservice
|
|
));
|
|
}
|
|
|
|
public function modifier(){
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$codeService = strtoupper($this->requete->getParametreFormulaire("codeService"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
$libelleEng = strtoupper($this->requete->getParametreFormulaire("libelleEng"));
|
|
|
|
$this->service->modifierservice($codeService,$libelle,$libelleEng,$id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|