52 lines
1.4 KiB
PHP
Executable File
52 lines
1.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Client.php';
|
|
|
|
class ControleurAjaxtmsouscripteurprestataire extends Controleur {
|
|
private $client;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->client = new Client();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$tmclient = $this->client->getTmclientprestataire();
|
|
|
|
$this->genererVueAjax(array('tmclient' => $tmclient));
|
|
}
|
|
|
|
public function controle()
|
|
{
|
|
$idClient = $this->requete->getParametreFormulaire("idClient");
|
|
|
|
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
|
|
|
|
$maxDateEffetTmClient = $this->client->getMaxDateEffetTmclientprestataire($idClient, $codePrestataire);
|
|
|
|
$this->genererVueAjax(array('maxDateEffetTmClient' => $maxDateEffetTmClient));
|
|
|
|
|
|
}
|
|
|
|
public function inserer()
|
|
{
|
|
$idClient = $this->requete->getParametreFormulaire("idClient");
|
|
|
|
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
|
|
$dateEffet = $this->requete->getParametreDate("dateEffet");
|
|
$tm = $this->requete->getParametreFormulaire("tm");
|
|
|
|
$this->client->insererTmclientprestataire($idClient, $codePrestataire, $dateEffet, $tm);
|
|
|
|
}
|
|
|
|
public function supprimer()
|
|
{
|
|
$idTm = $this->requete->getParametreFormulaire("idTm");
|
|
|
|
$this->client->supprimerTmclientprestataire($idTm);
|
|
|
|
}
|
|
} |