65 lines
1.4 KiB
PHP
Executable File
65 lines
1.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabpointvente.php';
|
|
|
|
class ControleurAjaxtblisterpointvente extends Controleur {
|
|
private $pv;
|
|
|
|
public function __construct() {
|
|
$this->pv = new Tabpointvente();
|
|
}
|
|
|
|
public function index() {
|
|
$tabpv = $this->pv->getlisterpointvente();
|
|
$existeselection = $this->pv->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'pointvente' => $tabpv,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
|
|
$this->pv->supprimerpointvente($id);
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$pvdonnee = $this->pv->getid($id);
|
|
|
|
if($pvdonnee['choix']=='0'){
|
|
$this->pv->selectionnerune($id);
|
|
}else{
|
|
$this->pv->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->pv->existeSelection();
|
|
if($existeselection){
|
|
$this->pv->deselectionnertoutes();
|
|
}else{
|
|
$this->pv->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->pv->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->pv->supprimerchoix();
|
|
|
|
}
|
|
}
|
|
|
|
|