Initial commit for newdesigngestionnaire project
This commit is contained in:
36
Controleur/ControleurAjaxtbmodifieraffection.php
Executable file
36
Controleur/ControleurAjaxtbmodifieraffection.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?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");
|
||||
|
||||
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
||||
$codeTypeAffection = $this->requete->getParametreFormulaire("codeTypeAffection");
|
||||
$libelleEng = strtoupper($this->requete->getParametreFormulaire("libelleEng"));
|
||||
|
||||
$this->aff->modifieraffection($libelle,$codeTypeAffection,$libelleEng,$id);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user