37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabaffection.php';
|
|
|
|
class ControleurAjaxtbmodifieraffection extends Controleur {
|
|
private $aff;
|
|
|
|
public function __construct() {
|
|
$this->aff = new Tabaffection();
|
|
}
|
|
|
|
public function index() {
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
$affection = $this->aff->getaffection($id);
|
|
$typeaffection = $this->aff->gettypeaffection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'affection' => $affection,
|
|
'typeaffection' => $typeaffection
|
|
));
|
|
}
|
|
|
|
public function modifier(){
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$codeAffection = strtoupper($this->requete->getParametreFormulaire("codeAffection"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
$codeTypeAffection = $this->requete->getParametreFormulaire("codeTypeAffection");
|
|
$libelleEng = strtoupper($this->requete->getParametreFormulaire("libelleEng"));
|
|
|
|
$this->aff->modifieraffection($codeAffection,$libelle,$codeTypeAffection,$libelleEng,$id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|