49,8 → 49,9 |
const GP_TOUS = 'PROJET_TOUS'; |
const GP_ID = 'PROJET_ID'; |
const GP_ID_MAX = 'PROJET_ID_MAX'; |
const GP_ID_LIST = 'PROJET_ID_LIST'; |
|
const GP_ID_LIST = 'PROJET_ID_LIST'; |
const GP_CE_CATEGORIE = 'PROJET_CE_CATEGORIE'; |
|
/*** Attributs : */ |
private $id_projet; |
private $ce_categorie; |
59,7 → 60,7 |
private $date_debut; |
private $duree_prevue; |
private $avancement; |
|
|
/*** Aggregations : */ |
|
/*** Constructeur : */ |
74,13 → 75,13 |
'gp_date_debut' => 'date_debut', |
'gp_duree_prevue' => 'duree_prevue', |
'gp_avancement' => 'avancement'); |
|
|
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
|
|
/*** Accesseurs : */ |
// Id Projet |
public function getIdProjet() |
91,7 → 92,7 |
{ |
$this->id_projet = $ip; |
} |
|
|
// Ce Categorie |
public function getCeCategorie() |
{ |
101,7 → 102,7 |
{ |
$this->ce_categorie = $cc; |
} |
|
|
// Nom Projet |
public function getNomProjet() |
{ |
111,7 → 112,7 |
{ |
$this->nom_projet = $np; |
} |
|
|
// Description |
public function getDescription() |
{ |
121,7 → 122,7 |
{ |
$this->description = $d; |
} |
|
|
// Date Debut |
public function getDateDebut() |
{ |
131,7 → 132,7 |
{ |
$this->date_debut = $dd; |
} |
|
|
// Duree Prevue |
public function getDureePrevue() |
{ |
141,7 → 142,7 |
{ |
$this->duree_prevue = $dp; |
} |
|
|
// Avancement |
public function getAvancement() |
{ |
151,7 → 152,7 |
{ |
$this->avancement = $a; |
} |
|
|
/*** Méthodes : */ |
|
/** |
181,6 → 182,11 |
$requete = 'SELECT * '. |
'FROM gestion_projet '. |
'WHERE gp_id_projet IN ('.$parametres[0].') '; |
break; |
case Projet::GP_CE_CATEGORIE: |
$requete = 'SELECT * '. |
'FROM gestion_projet '. |
'WHERE gp_ce_categorie = '.$parametres[0].' '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
193,8 → 199,8 |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
|
$resultat_nbre = count($tab_resultat); |
|
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
203,7 → 209,7 |
return false; |
} |
} |
|
|
/** Afficher l'objet Projet */ |
function afficherProjet() |
{ |