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

121 lines
3.4 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/College_temp.php';
class ControleurAjaxremboursementgarantie 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);
$_SESSION['idCollege'] = $idCollege;
if(is_array($college)){
$idBaremePriseEnCharge = $college['idBaremePriseEnCharge'];
$garanties = $this->college_temp->getlistegaranties($idBaremePriseEnCharge);
}else{
$garanties = array();
}
//var_dump($idBaremePriseEnCharge);
$typeremboursement = $this->college_temp->getTypeRemboursement();
$listegaranties = $this->college_temp->getallgaranties();
$garantiespolice = $this->college_temp->getgarantiespolice();
$this->genererVueAjax(array('college' => $college, 'garanties' => $garanties, 'typeremboursement' => $typeremboursement,
'listegaranties' => $listegaranties, 'garantiespolice' => $garantiespolice));
}
public function majlimite()
{
$idGarantie = $this->requete->getParametreFormulaire("idGarantie");
$nbreLimiteGarantie = $this->requete->getParametreFormulaire("nbreLimiteGarantie");
$idCollege = $this->requete->getParametreFormulaire("idCollege");
if($idCollege==""){
$this->college_temp->majlimitepolice($idGarantie, $nbreLimiteGarantie);
}else{
$this->college_temp->majlimitecollege($idGarantie, $nbreLimiteGarantie);
}
}
public function majtyperemboursement()
{
$idGarantie = $this->requete->getParametreFormulaire("idGarantie");
$codeTypeRemboursement = $this->requete->getParametreFormulaire("codeTypeRemboursement");
$idCollege = $this->requete->getParametreFormulaire("idCollege");
if($idCollege==""){
$this->college_temp->majtyperemboursementpolice($idGarantie, $codeTypeRemboursement);
}else{
$this->college_temp->majtyperemboursementcollege($idGarantie, $codeTypeRemboursement);
}
}
public function retirer()
{
$idAffection = $this->requete->getParametreFormulaire("idAffection");
$this->college_temp->retireraffectiontm($idAffection);
}
public function ajouter()
{
$codeGarantie = $this->requete->getParametreFormulaire("codeGarantie");
$this->college_temp->ajouterunegarantiepolice($codeGarantie);
//$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");
}
}