Import initial du projet Production
This commit is contained in:
48
Controleur/ControleurAjaxtmpolice.php
Normal file
48
Controleur/ControleurAjaxtmpolice.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Police.php';
|
||||
|
||||
class ControleurAjaxtmpolice extends Controleur {
|
||||
private $police;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->police = new Police();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$tmpolice = $this->police->getTmpolice();
|
||||
|
||||
$this->genererVueAjax(array('tmpolice' => $tmpolice));
|
||||
}
|
||||
|
||||
public function controle()
|
||||
{
|
||||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||||
|
||||
$maxDateEffetTmPolice = $this->police->getMaxDateEffetTmPolice($idPolice);
|
||||
|
||||
$this->genererVueAjax(array('maxDateEffetTmPolice' => $maxDateEffetTmPolice));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function inserer()
|
||||
{
|
||||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||||
$dateEffet = $this->requete->getParametreDate("dateEffet");
|
||||
$tm = $this->requete->getParametreFormulaire("tm");
|
||||
|
||||
$this->police->insererTmpolice($idPolice, $dateEffet, $tm);
|
||||
|
||||
}
|
||||
|
||||
public function supprimer()
|
||||
{
|
||||
$idTm = $this->requete->getParametreFormulaire("idTm");
|
||||
|
||||
$this->police->supprimerTmpolice($idTm);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user