Initial commit for newdesigngestionnaire project
This commit is contained in:
39
Controleur/ControleurAjaxtbmodifiertypeaffection.php
Executable file
39
Controleur/ControleurAjaxtbmodifiertypeaffection.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Tabtypeaffection.php';
|
||||
require_once 'Modele/Ouinon.php';
|
||||
|
||||
class ControleurAjaxtbmodifiertypeaffection extends Controleur {
|
||||
private $typea;
|
||||
|
||||
public function __construct() {
|
||||
$this->typea = new Tabtypeaffection();
|
||||
$this->ouinonoptionnelle = (new Ouinon())->getListe();
|
||||
$this->ouinonplafondmodifiable = (new Ouinon())->getListe();
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$id = $this->requete->getParametreFormulaire("id");
|
||||
$typea = $this->typea->gettypeaffection($id);
|
||||
|
||||
$this->genererVueAjax(array(
|
||||
'ouinonoptionnelle' => $this->ouinonoptionnelle,
|
||||
'ouinonplafondmodifiable' => $this->ouinonplafondmodifiable,
|
||||
'typeaffection' => $typea
|
||||
));
|
||||
}
|
||||
|
||||
public function modifier(){
|
||||
$id = $this->requete->getParametreFormulaire("id");
|
||||
|
||||
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
||||
$libelleEng = $this->requete->getParametreFormulaire("libelleEng");
|
||||
$maladieChronique = $this->requete->getParametreFormulaire("maladieChronique");
|
||||
|
||||
$this->typea->modifiertypeaffection($libelle,$libelleEng,$maladieChronique,$id);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user