Import initial du projet prestation
This commit is contained in:
40
Modele/Typeavenant.php
Normal file
40
Modele/Typeavenant.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
require_once 'Framework/Modele.php';
|
||||
|
||||
class Typeavenant extends Modele
|
||||
{
|
||||
|
||||
public function getListe()
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT codeTypeAvenant as `code`, libelleEng as libelle FROM typeavenant order by libelle';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT codeTypeAvenant as `code`, libelle FROM typeavenant order by libelle';
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql);
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeSuite($oldCodeTypeAvenant)
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT A.codeTypeAvenant as `code`, A.libelleEng as libelle FROM typeavenant A
|
||||
join suiteavenant B on (B.codeTypeAvenant=A.codeTypeAvenant)
|
||||
where (B.oldCodeTypeAvenant=?) order by A.libelle';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT A.codeTypeAvenant as `code`, A.libelle FROM typeavenant A
|
||||
join suiteavenant B on (B.codeTypeAvenant=A.codeTypeAvenant)
|
||||
where (B.oldCodeTypeAvenant=?) order by A.libelle';
|
||||
}
|
||||
|
||||
$liste = $this->executerRequete($sql, array($oldCodeTypeAvenant));
|
||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user