Import initial du projet Production
This commit is contained in:
71
Controleur/ControleurFichedevis.php
Normal file
71
Controleur/ControleurFichedevis.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Police_d.php';
|
||||
require_once 'Modele/Collegepolice_d.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
class ControleurFichedevis extends Controleur
|
||||
{
|
||||
private $menuvue;
|
||||
private $police;
|
||||
private $college;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Fichedevis");
|
||||
|
||||
$this->police = new Police_d();
|
||||
$this->college = new Collegepolice_d();
|
||||
|
||||
$_SESSION['modeDevis'] = "1";
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
||||
|
||||
$this->police->getContextePoliceId($idPolice);
|
||||
$police = $this->police->getPoliceId($idPolice);
|
||||
|
||||
$this->police->getContexteClientId($idPolice);
|
||||
|
||||
$numeroOptionTarif = $_SESSION['numeroOptionTarif'];
|
||||
|
||||
$nomGarant = $this->police->getNomGarant($police['codeGcAssureur']);
|
||||
|
||||
$_SESSION['nomGcAssureur_C'] = $nomGarant;
|
||||
|
||||
$optionstarif = $this->college->getoptionstarif($idPolice);
|
||||
|
||||
$colleges = $this->college->getCollegesPolice($idPolice, $numeroOptionTarif);
|
||||
|
||||
$totalcollege = $this->college->getTotaldcollege($idPolice, $numeroOptionTarif);
|
||||
|
||||
|
||||
$this->genererVue(array('police' => $police, 'colleges' => $colleges, 'totalcollege' => $totalcollege,
|
||||
'optionstarif' => $optionstarif));
|
||||
}
|
||||
|
||||
public function supprimer()
|
||||
{
|
||||
$idPolice = $_SESSION['idPolice_d_Ajax'];
|
||||
|
||||
if($this->police->supprimer($idPolice))
|
||||
{
|
||||
$this->rediriger("Ficheprospect");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->rediriger("Fichedevis");
|
||||
}
|
||||
}
|
||||
|
||||
public function supprimerCollege()
|
||||
{
|
||||
$idCollege = $this->requete->getParametre("id");
|
||||
|
||||
$this->college->supprimer($idCollege);
|
||||
$this->rediriger("Fichedevis");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user