2. Présentation de quelques formulaires
g. Interface de gestion des prestataires
Elle permet de créer, modifier et supprimer des
prestataires.
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
47
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA

Organigramme des
données
Unité de traitement UT
Cette unité permet l'enregistrement, la modification et la
suppression des prestataires par corps de métiers.

Corps de métiers

Clavier
Ecran

Prestataires
UT : Gestion des actes
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
47
48
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
Listing
Les procédures créées
PROCEDURE enregistrement_corps_de_metier()
SI SansEspace(SAI_Nom_et_Prénom)="" ALORS
Erreur("Veuillez saisir le nom et le prenom du client")
RepriseSaisie(SAI_Nom_et_Prénom)
SINON
SI PRESTATAIRE..NouvelEnregistrement=Vrai ALORS
SI PAS
HRecherche(PRESTATAIRE,nom_et_corp,[COMBO_Corpsdedemétiers.COL_IDOrd
redemétiers,SAI_Nom_et_Prénom]) ALORS
EcranVersFichier()
HAjoute(PRESTATAIRE)
SINON
Erreur("Un autre prestaire du même corps de métier
porte déjà ce
nom.")
FIN
SINON
SI TABLE_PRESTATAIRE..Vide=Vrai ALORS
Erreur("Il n'y a aucune donnée à modifier. Pour
ajouter des
prestataires,vous devez cliquer sur le bouton 'Nouveau' puis
insérer les données dans les
champs.")
SINON
SI
PAS COMBO_Corpsdedemétiers.COL_IDOrdredemétiers=TABLE_PRESTATAIRE.COL
IDOrdredemétiers ALORS
_
SI OuiNon("Cette modification va affecter le corps de
métier auquel appartient ce prestataire. Voulez-vous
continuer?")=Faux ALORS
RETOUR
FIN
FIN
sdMaquery est une Source de Données
machaine est une chaîne="SELECT * FROM PRESTATAIRE WHERE
PRESTATAIRE.Nom_et_Prénom='"+SAI_Nom_et_Prénom+"' AND
PRESTATAIRE.IDOrdredemétiers='"+COMBO_Corpsdedemétiers.COL_IDOrdrede
métiers+"'"
SI
HExécuteRequêteSQL(sdMaquery,hRequêteDéfaut,machaine)
ALORS
SI HNbRec(sdMaquery)=0 ALORS
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
49
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
modif_prestataire()
SINON SI HNbRec(sdMaquery)=1
HLitPremier(sdMaquery)
SI
sdMaquery.IDPRESTATAIRE=TABLE_PRESTATAIRE.COL_IDPRESTATAIRE
ALORS
modif prestataire()
SINON
Erreur("Un autre prestataire existe déjà avec ce
nom dans le cors de métier
'"+COMBO_Corpsdedemétiers.COL_LibelleOrdredemetier+"'")
FIN
SINON
Erreur("Un autre prestataire existe déjà avec ce
nom
dans le corps de
métier '"+COMBO_Corpsdedemétiers.COL_LibelleOrdredemetier+"'")
FIN
FIN
FIN
FIN
FIN
PROCEDURE CHARGEMENT_PRESTATAIRES(MATABLE est une chaîne)
sdMaquery est une Source de Données
sMachaine est une chaîne="SELECT PRESTATAIRE.Adresse,
PRESTATAIRE.IDOrdredemétiers,
PRESTATAIRE.IDPRESTATAIRE,
PRESTATAIRE.Nom_et_Prénom, PRESTATAIRE.Telephone,
Corpsdedemétiers.LibelleOrdredemetier FROM
PRESTATAIRE,Corpsdedemétiers WHERE
PRESTATAIRE.IDOrdredemétiers=Corpsdedemétiers.IDOrdredemétiers"
SI
HExécuteRequêteSQL(sdMaquery,hRequêteDéfaut,sMachaine)
ALORS
TableSupprimeTout({MATABLE})
POUR TOUT sdMaquery
TableAjouteLigne({MATABLE},sdMaquery.IDPRESTATAIRE,sdMaquery.I
DOrdredemétiers,sdMaquery.Nom_et_Prénom,sdMaquery.Adresse,sdMaquery.Teleph
one,sdMaquery.LibelleOrdredemetier)
FIN
FIN
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
50
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
Code des différents champs de la
fenêtre
- Initialisation de la fenêtre
CHARGEMENT_PRESTATAIRES("TABLE_PRESTATAIRE")
ExécuteTraitement(TABLE_PRESTATAIRE,trtSélection)
TableTrie(TABLE_PRESTATAIRE,COL_Corps_de_métier..Nom,COL_Nom_et_Pré
nom..Nom)
SI PAS TABLE_PRESTATAIRE..Occurrence=0 ALORS tabMontableau est un
tableau d'entier
POUR i = 1 A TABLE_PRESTATAIRE..Occurrence
n est
un entier=TableIndiceRupture(TABLE_PRESTATAIRE.RUPT_HautRupture1,i)
SI TableauCherche(tabMontableau,tcLinéaire,n)=-1
ALORS Ajoute(tabMontableau,n)
FIN
FIN
POUR i = 1 A TableauOccurrence(tabMontableau)
TABLE_PRESTATAIRE[i].RUPT_HautRupture1.LIB_Moi=TABLE_PREST
ATAIRE[i].COL_Corps_de_métier
FIN
FIN
- Bouton enregistrer
enregistrement_corps_de_metier()
InitFenêtre(Faux) MaFenêtre..Plan=3
- Bouton Nouveau
HRAZ(PRESTATAIRE)
RAZ(Vrai)
- Bouton Supprimer
SI OuiNon("Voulez-vous vraiment supprimer ce
prestataire")=Vrai ALORS
sMachaine est une chaîne="Delete from PRESTATAIRE where
PRESTATAIRE.IDPRESTATAIRE='"+TABLE_PRESTATAIRE.COL_IDPRESTAT AIRE+"'"
sdMareq est une Source de Données
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
51
SI
HExécuteRequêteSQL(sdMareq,hRequêteDéfaut,sMachaine)
ALORS ToastAffiche("La supression a été faite avec
succès")
FIN
FIN
InitFenêtre(Faux)
MaFenêtre..Plan=3
- Sélection d'une ligne de la table
HLitRecherche(PRESTATAIRE,IDPRESTATAIRE,TABLE_PRESTATAIRE.COL_I
DPRESTATAIRE)
SAI_Adresse=COL_Adresse
SAI_Telephone=COL_Telephone
SAI_Nom_et_Prénom=COL_Nom_et_Prénom
COMBO_Corpsdedemétiers=TABLE_PRESTATAIRE.COL_IDOrdredemétiers

RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
52
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
Procédures locales
PROCEDURE affichage_des_noms_par_ruptures()
TableTrie(TABLE_Bâtiment,COL_Type_de_villa..Nom)
tabmontableau est un tableau de chaîne
POUR i = 1 A TABLE_Bâtiment..Occurrence
TableSelectPlus(TABLE_Bâtiment,i) n est un
entier=TableIndiceRupture(TABLE_Bâtiment.RUPT_HautRupture1) SI
TableauCherche(tabmontableau,tcLinéaire,n)=-1 ALORS
Ajoute(tabmontableau,n)
FIN
FIN
POUR i = 1 A TableauOccurrence(tabmontableau)
TABLE_Bâtiment[i].RUPT_HautRupture1.LIB_SansNom1=TABLE_Bâtiment
[i].COL_Type_de_villa
FIN
PROCEDURE aucune_selection
pour_type_de_batiment(smachaine,sdSmaquery)
SELON COMBO_Type_de_recherche//Aucune sélection * 2
CAS 1
POUR TOUT Bâtiment
smachaine2 est une chaîne
SI Bâtiment.Adresse bat="" ALORS
HLitRecherche(parcelle,Numérodebatiment,Bâtiment.Numérodebatiment)
SI HTrouve(parcelle) ALORS
smachaine2="Lot "+parcelle.Numerodelot+"
"+Bâtiment.Numérodebatiment
FIN
SINON
smachaine2=Bâtiment.Adresse_bat
FIN
TableAjouteLigne(TABLE_Bâtiment,Bâtiment.IDBâtiment,Bâtiment.Type_de_
villa,smachaine2,Bâtiment.Niveau_d_éxecution,Bâtiment.Niveau_de_payement,Bâtim
ent.IDClient,Bâtiment.Date_debut_des_travaux,Bâtiment.Date_de_livraison,Bâtiment.
Montant_du,Bâtiment.Montant_payé,Bâtiment.resteàpayer,Bâtiment.OPtion_SBEE,Bâ
timent.Montant_payé_SBEE,Bâtiment.Reste_SBEE)
affichage_des_noms_par_ruptures()
FIN
ExécuteTraitement(TABLE_Bâtiment,trtSélection)
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
CAS 2 //Aucune selection et bâtiment en cours
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.Niveau d éxecution>0 AND
Bâtiment.Niveau d éxecution<>100 ORDER
_ _ _ _
BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 3 // Aucune selection et reservation
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.Frais_de_dossier>0 AND
Bâtiment.Niveau_de_payement<30 ORDER BY
Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 4 //aucune selection maison livrées
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.livrée=1
order by Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 5 //aucune selection et terminé mais non
livré
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.livrée=0
and Bâtiment.Niveau_d_éxecution=100 order by
Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
FIN
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
53
PROCEDURE f3_pr_type_de_batiment(smachaine,sdSmaquery)
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
54
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
SELON COMBO_Type_de_recherche// typ_specifik et Aucune
sélection * 2 CAS 1
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.Type_de_villa='"+COMBO_Type_de_bâtiment..ValeurAffichée+"'
ORDER BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 2 //typ specifik et bâtiment en cours
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.Niveau_d_éxecution>0 AND
Bâtiment.Niveau_d_éxecution<100 AND
Bâtiment.Type_de_villa='"+COMBO_Type_de_bâtiment..ValeurAffichée+"'
ORDER
BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 3 //typ_specifik et reservation
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.Frais_de_dossier>0 AND
Bâtiment.Niveau_de_payement<30 AND
Bâtiment.Type_de_villa='"+COMBO_Type_de_bâtiment..ValeurAffichée+"'
ORDER BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
CAS 4 //typ_specifik maison livrées
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.livrée=1
AND
Bâtiment.Type_de_villa='"+COMBO_Type_de_bâtiment..ValeurAffichée+"'
ORDER BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS
remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
55
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
FIN
CAS 5 //typ_specifik et terminé mais non livré
smachaine="SELECT * FROM Bâtiment WHERE
Bâtiment.livrée=0 and Bâtiment.Niveau_d_éxecution=100
AND
Bâtiment.Type_de_villa='"+COMBO_Type_de_bâtiment..ValeurAffichée+"'
ORDER BY Bâtiment.Type_de_villa"
SI
HExécuteRequêteSQL(sdSmaquery,hRequêteDéfaut,smachaine)
ALORS remplit_table(sdSmaquery)
SINON
Erreur(HErreurInfo())
FIN
FIN
PROCEDURE remplit_table(sdSmaquery est une Source de
Données)
TableSupprimeTout(TABLE_Bâtiment)
POUR TOUT sdSmaquery
smachaine2 est une chaîne
SI sdSmaquery.Adresse_bat="" ALORS
HLitRecherche(parcelle,Numérodebatiment,sdSmaquery.Numérodebatiment)
SI HTrouve(parcelle) ALORS
smachaine2="Lot "+parcelle.Numerodelot+"
"+sdSmaquery.Numérodebatiment
FIN
SINON
smachaine2=sdSmaquery.Adresse_bat
FIN
TableAjouteLigne(TABLE_Bâtiment,sdSmaquery.IDBâtiment,sdSmaquery.Ty
pe_de_villa,smachaine2,sdSmaquery.Niveau_d_éxecution,sdSmaquery.Niveau_de_pa
yement,sdSmaquery.IDClient,sdSmaquery.Date_debut_des_travaux,sdSmaquery.Date
_de_livraison,sdSmaquery.Montant_du,sdSmaquery.Montant
payé,sdSmaquery.resteà
payer,sdSmaquery.OPtion_SBEE,sdSmaquery.Montant_payé_SBEE,sdSmaquery.Rest
e_SBEE)
FIN
affichage_des_noms_par_ruptures()
ExécuteTraitement(TABLE_Bâtiment,trtSélection)
RAPPORT DE STAGE BTS
Réalisé Père Silvère Renaud DEKPON
& Firmin Crédo Déodat FONTON
56
Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA

Mise en place d'un tableau de bord de suivi évaluation
d'un projet de construction de 600 logements sociaux à OUEDO : Cas de
la GCITT Bénin SA
RAPPORT DE STAGE BTS
Réalisé par Père Silvère Renaud
DEKPON & Firmin Crédo Déodat FONTON
57
|