65 lines
1.6 KiB
PHP
Executable File
65 lines
1.6 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabmodepaiement.php';
|
|
|
|
class ControleurAjaxtblistermodepaiement extends Controleur {
|
|
private $modepaiement;
|
|
|
|
public function __construct() {
|
|
$this->modepaiement = new Tabmodepaiement();
|
|
}
|
|
|
|
public function index() {
|
|
$tabmodepaiement = $this->modepaiement->getlistermodepaiement();
|
|
$existeselection = $this->modepaiement->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'modepaiement' => $tabmodepaiement,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$this->modepaiement->supprimermodepaiement($id);
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$modepaiementdonnee = $this->modepaiement->getid($id);
|
|
|
|
if($modepaiementdonnee['choix']=='0'){
|
|
$this->modepaiement->selectionnerune($id);
|
|
}else{
|
|
$this->modepaiement->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->modepaiement->existeSelection();
|
|
if($existeselection){
|
|
$this->modepaiement->deselectionnertoutes();
|
|
}else{
|
|
$this->modepaiement->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->modepaiement->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->modepaiement->supprimerchoix();
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|