production/Controleur/ControleurAjaxprestatairetm.php
2025-12-02 11:29:44 +00:00

97 lines
2.8 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/College_temp.php';
class ControleurAjaxprestatairetm extends Controleur {
private $college_temp;
public function __construct() {
$this->college_temp = new College_temp();
}
public function index()
{
$idCollege = $this->requete->getParametreFormulaire("idCollege");
$college= $this->college_temp->getCollegepoliceId($idCollege);
$codeReseau = $college['codeReseau'];
$_SESSION['codeReseau'] = $codeReseau;
$_SESSION['idCollege'] = $idCollege;
//$prestatairereseaus = $this->college_temp->getPrestatairereseausoins($codeReseau);
$prestatairereseaus= $this->college_temp->getprestatairereseautm($idCollege);
$prestatairetms= $this->college_temp->getprestatairetm($codeReseau, $idCollege);
$garanties = $this->college_temp->getgaranties();
$affections = $this->college_temp->getaffections();
$this->genererVueAjax(array('college' => $college, 'prestatairereseaus' => $prestatairereseaus,
'prestatairetms' => $prestatairetms, 'garanties' => $garanties, 'affections' => $affections));
}
public function majtm()
{
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
$tm = $this->requete->getParametreFormulaire("tm");
$this->college_temp->majtmprestatairetm($idPrestation, $tm);
//$this->executerAction("index");
}
public function retirer()
{
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
$this->college_temp->retirerprestatairetm($idPrestation);
//$this->executerAction("index");
}
public function ajouterunprestatairetm()
{
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
$idCollege = $this->requete->getParametreFormulaire("idCollege");
$this->college_temp->ajouterunprestatairetm($codePrestataire, $idCollege);
//$this->executerAction("index");
}
public function initprestation()
{
$idCollegeTemp = $_SESSION['idCollegeTemp'];
$this->college_temp->initPrestationCollege($idCollegeTemp);
}
// 09-01-2023
public function majgarantie()
{
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
$codeGarantie = $this->requete->getParametreFormulaire("codeGarantie");
$this->college_temp->majgarantieprestatairetm($idPrestation, $codeGarantie);
//$this->executerAction("index");
}
public function majaffection()
{
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
$codeAffection = $this->requete->getParametreFormulaire("codeAffection");
$this->college_temp->majaffectionprestatairetm($idPrestation, $codeAffection);
//$this->executerAction("index");
}
}