prestation/Controleur/ControleurTblistenaturepiece.php
2025-12-01 18:54:33 +00:00

31 lines
1.0 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Naturepiece.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurTblistenaturepiece extends Controleur {
private $menuvue;
private $naturepiece;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuGestionTatbles('naturepiece');
$this->naturepiece = new naturepiece();
}
public function index($codesearch="",$libellesearch="") {
if (isset($_POST['codesearch']))
{
$codesearch=$_POST['codesearch'];
$libellesearch=$_POST['libellesearch'];
}
$naturepieces = $this->naturepiece->getnaturepieces($codesearch,$libellesearch);
$this->genererVue(array('naturepieces' => $naturepieces, 'codesearch' => $codesearch, 'libellesearch' => $libellesearch));
}
public function supprimer() {
$id = $this->requete->getParametre("id");
$this->naturepiece->supprimer($id);
$this->rediriger("Tblistenaturepiece");
}
}