66 lines
1.5 KiB
PHP
Executable File
66 lines
1.5 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabmoyenpaiement.php';
|
|
|
|
class ControleurAjaxtblistermoyenpaiement extends Controleur {
|
|
private $paiement;
|
|
|
|
public function __construct() {
|
|
$this->paiement = new Tabmoyenpaiement();
|
|
}
|
|
|
|
public function index() {
|
|
$tabpaiement = $this->paiement->getlistermoyenpaiement();
|
|
$existeselection = $this->paiement->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'moyenpaiement' => $tabpaiement,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
|
|
$this->paiement->supprimermoyenpaiement($id);
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$paiementdonnee = $this->paiement->getid($id);
|
|
|
|
if($paiementdonnee['choix']=='0'){
|
|
$this->paiement->selectionnerune($id);
|
|
}else{
|
|
$this->paiement->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->paiement->existeSelection();
|
|
if($existeselection){
|
|
$this->paiement->deselectionnertoutes();
|
|
}else{
|
|
$this->paiement->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->paiement->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->paiement->supprimerchoix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|