SlideShare une entreprise Scribd logo
Programmation évènementielle : WINDEV
L’objet Table
Mémoire
Application
L’objectif de cette Application est de manipuler les fonctions relatives à l’objet table
mémoire.
Soit l’interface suivante
Travail demandé :
Ecrire la procédure évènementielle relative à chaque bouton de commande sachant que :
 Le bouton autre consiste à initialiser tous les objets a l’exception de :
 La table mémoire
 Les zones du texte :
 Nombre facture
 Total espèce
 Total Cheque
 Total
 Le bouton valider consiste à ajouter les données saisies dans une ligne de la table
mémoire sachant que le numéro de règlement ne doit pas être dupliqué
 Le bouton chercher consiste à faire la recherche d’un régalement déjà ajouté dans la
table mémoire par son numéro de règlement
 Après la recherche :
 Le bouton Modifier consiste à modifier le règlement cherché
 Le bouton supprimer consiste à supprimer le règlement en cours (cherché)
 Le bouton fermer consiste à arrêter l’exécution
Déclaration globale de fenêtre
r est un entier
mr est une chaîne
Clic sur Autre
sai_nr=""
sai_nf=""
sai_dr=""
sai_mtr=""
RepriseSaisie(sai_nr)
Clic sur Valider
//---vérification de l'existence de numéro règlement-----------
r=TableCherche(NRegelemt,sai_nr)
SI r>-1 ALORS
Erreur("Ce numéro est déja saisi")
RETOUR //---------le reste du programme ne sera pas exécuté----
FIN
//------------------------------------------------------------
SI sel_R..Valeur=1 ALORS
mr="Espece"
SINON
mr="Cheque"
FIN
TableAjoute(Table1,sai_nr+TAB+sai_nf+TAB+Combo..ValeurAffichée+TAB+mr+TAB+
sai_dr+TAB+sai_mtr)
//--calcul de total et total facture espèce et cheque----------
ligne est entier
totalht est un réel
tesp est un réel
tch est un réel
POUR ligne=1 A TableOccurrence(Table1)
TableSelectPlus(Table1,ligne)
totalht=totalht+Table1.Monatant_Reglement//-cumul des montants ht
//---------------calcul de total facture espèce et chèque ---------//
SI Table1.Mode_Reglement="Espece" ALORS
tesp=tesp+Table1.Monatant_Reglement
SINON
tch=tch+Table1.Monatant_Reglement
FIN
FIN
sai_t=totalht
sai_Tch=tesp
sai_tesp=tch
sai_nbf=TableOccurrence(Table1)
Clic sur Rechercher
nr est chaîne
Saisie("veuillez saisir le numéro de règlement a éditer",nr)
r=TableCherche(NRegelemt,nr)
SI r=-1 ALORS
Info("Ce numéro de reglement n'existe pas")
SINON
TableSelectPlus(Table1,r)
sai_nr=Table1.NRegelemt
sai_nf=Table1.Nfacture
SI Table1.Operation="Vente" ALORS
Combo..Valeur=1
SINON
Combo..Valeur=2
FIN
SI Table1.Mode_Reglement="Espece" ALORS
sel_R..Valeur=1
SINON
sel_R..Valeur=2
FIN
sai_dr=Table1.Date_Reglement
sai_mtr=Table1.Monatant_Reglement
FIN
Clic sur Modifier
SI OuiNon(Non, «Voulez-vous modifiez cet enregistrement?")=Oui ALORS
SI sel_R..Valeur=1 ALORS
mr="Espèce"
SINON
mr="Cheque"
FIN
TableModifie(Table1,sai_nr+TAB+sai_nf+TAB+Combo..ValeurAffichée+TAB+mr+TAB+sai_dr+TAB+
sai_mtr)
ExécuteTraitement (Autre1,trtClic)
FIN
Clic sur Fermer
SI OuiNon (Non, «Voulez-vous quitter?»)=Oui ALORS
FinProgramme()
FIN
Clic sur Supprimer
SI OuiNon(Non, «voulez-vous supprimer ce règlement?")=Oui ALORS
TableSupprime(Table1,r)
//---------recalcule des montant-------------
ligne est entier
totalht est un réel
tesp est un réel
tch est un réel
POUR ligne=1 A TableOccurrence(Table1)
TableSelectPlus(Table1,ligne)
totalht=totalht+Table1.Monatant_Reglement//-cumul des montants ht
//-------------calcul de total facture espèce--------------//
SI Table1.Mode_Reglement="Espece" ALORS
tesp=tesp+Table1.Monatant_Reglement
SINON
tch=tch+Table1.Monatant_Reglement
FIN
FIN
sai_t=totalht
sai_Tch=tesp
sai_tesp=tch
sai_nbf=TableOccurrence(Table1)
//----------Exécuter le traitement clic de bouton autre-----------
ExécuteTraitement(Autre1,trtClic)
FIN
Bouton gauche double clic
sai_nr=Table1.NRegelemt
sai_nf=Table1.Nfacture
SI Table1.Operation="Vente" ALORS
Combo..Valeur=1
SINON
Combo..Valeur=2
FIN
SI Table1.Mode_Reglement="Espece" ALORS
sel_R..Valeur=1
SINON
sel_R..Valeur=2
FIN
sai_dr=Table1.Date_Reglement
sai_mtr=Table1.Monatant_Reglement
Attention : Il faut tout d’abord ajouter cet évènement en cliquant ici

Contenu connexe

Dernier

Iris van Herpen. pptx
Iris            van        Herpen.     pptxIris            van        Herpen.     pptx
Iris van Herpen. pptx
Txaruka
 
Iris van Herpen. pptx
Iris         van         Herpen.      pptxIris         van         Herpen.      pptx
Iris van Herpen. pptx
Txaruka
 
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
BenotGeorges3
 
Burkina Faso library newsletter May 2024
Burkina Faso library newsletter May 2024Burkina Faso library newsletter May 2024
Burkina Faso library newsletter May 2024
Friends of African Village Libraries
 
Procédure consignation Lock Out Tag Out.pptx
Procédure consignation  Lock Out Tag Out.pptxProcédure consignation  Lock Out Tag Out.pptx
Procédure consignation Lock Out Tag Out.pptx
caggoune66
 
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La JeunesseConseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
Oscar Smith
 
Cycle de Formation Théâtrale 2024 / 2025
Cycle de Formation Théâtrale 2024 / 2025Cycle de Formation Théâtrale 2024 / 2025
Cycle de Formation Théâtrale 2024 / 2025
Billy DEYLORD
 
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
M2i Formation
 
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
cristionobedi
 
Edito-B1-francais Manuel to learning.pdf
Edito-B1-francais Manuel to learning.pdfEdito-B1-francais Manuel to learning.pdf
Edito-B1-francais Manuel to learning.pdf
WarlockeTamagafk
 
Iris van Herpen. pptx
Iris         van        Herpen.      pptxIris         van        Herpen.      pptx
Iris van Herpen. pptx
Txaruka
 

Dernier (11)

Iris van Herpen. pptx
Iris            van        Herpen.     pptxIris            van        Herpen.     pptx
Iris van Herpen. pptx
 
Iris van Herpen. pptx
Iris         van         Herpen.      pptxIris         van         Herpen.      pptx
Iris van Herpen. pptx
 
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
Newsletter SPW Agriculture en province du Luxembourg du 12-06-24
 
Burkina Faso library newsletter May 2024
Burkina Faso library newsletter May 2024Burkina Faso library newsletter May 2024
Burkina Faso library newsletter May 2024
 
Procédure consignation Lock Out Tag Out.pptx
Procédure consignation  Lock Out Tag Out.pptxProcédure consignation  Lock Out Tag Out.pptx
Procédure consignation Lock Out Tag Out.pptx
 
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La JeunesseConseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
Conseils pour Les Jeunes | Conseils de La Vie| Conseil de La Jeunesse
 
Cycle de Formation Théâtrale 2024 / 2025
Cycle de Formation Théâtrale 2024 / 2025Cycle de Formation Théâtrale 2024 / 2025
Cycle de Formation Théâtrale 2024 / 2025
 
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
Formation M2i - Onboarding réussi - les clés pour intégrer efficacement vos n...
 
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
Formation Intelligence Artificielle pour dirigeants- IT6-DIGITALIX 24_opt OK_...
 
Edito-B1-francais Manuel to learning.pdf
Edito-B1-francais Manuel to learning.pdfEdito-B1-francais Manuel to learning.pdf
Edito-B1-francais Manuel to learning.pdf
 
Iris van Herpen. pptx
Iris         van        Herpen.      pptxIris         van        Herpen.      pptx
Iris van Herpen. pptx
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Correction exercice table mémoire

  • 1. Programmation évènementielle : WINDEV L’objet Table Mémoire
  • 2. Application L’objectif de cette Application est de manipuler les fonctions relatives à l’objet table mémoire. Soit l’interface suivante Travail demandé : Ecrire la procédure évènementielle relative à chaque bouton de commande sachant que :  Le bouton autre consiste à initialiser tous les objets a l’exception de :  La table mémoire  Les zones du texte :  Nombre facture  Total espèce  Total Cheque  Total  Le bouton valider consiste à ajouter les données saisies dans une ligne de la table mémoire sachant que le numéro de règlement ne doit pas être dupliqué  Le bouton chercher consiste à faire la recherche d’un régalement déjà ajouté dans la table mémoire par son numéro de règlement  Après la recherche :  Le bouton Modifier consiste à modifier le règlement cherché  Le bouton supprimer consiste à supprimer le règlement en cours (cherché)  Le bouton fermer consiste à arrêter l’exécution
  • 3. Déclaration globale de fenêtre r est un entier mr est une chaîne Clic sur Autre sai_nr="" sai_nf="" sai_dr="" sai_mtr="" RepriseSaisie(sai_nr) Clic sur Valider //---vérification de l'existence de numéro règlement----------- r=TableCherche(NRegelemt,sai_nr) SI r>-1 ALORS Erreur("Ce numéro est déja saisi") RETOUR //---------le reste du programme ne sera pas exécuté---- FIN //------------------------------------------------------------ SI sel_R..Valeur=1 ALORS mr="Espece" SINON mr="Cheque" FIN TableAjoute(Table1,sai_nr+TAB+sai_nf+TAB+Combo..ValeurAffichée+TAB+mr+TAB+ sai_dr+TAB+sai_mtr) //--calcul de total et total facture espèce et cheque---------- ligne est entier totalht est un réel tesp est un réel tch est un réel POUR ligne=1 A TableOccurrence(Table1) TableSelectPlus(Table1,ligne) totalht=totalht+Table1.Monatant_Reglement//-cumul des montants ht //---------------calcul de total facture espèce et chèque ---------// SI Table1.Mode_Reglement="Espece" ALORS tesp=tesp+Table1.Monatant_Reglement SINON tch=tch+Table1.Monatant_Reglement FIN FIN sai_t=totalht sai_Tch=tesp sai_tesp=tch sai_nbf=TableOccurrence(Table1)
  • 4. Clic sur Rechercher nr est chaîne Saisie("veuillez saisir le numéro de règlement a éditer",nr) r=TableCherche(NRegelemt,nr) SI r=-1 ALORS Info("Ce numéro de reglement n'existe pas") SINON TableSelectPlus(Table1,r) sai_nr=Table1.NRegelemt sai_nf=Table1.Nfacture SI Table1.Operation="Vente" ALORS Combo..Valeur=1 SINON Combo..Valeur=2 FIN SI Table1.Mode_Reglement="Espece" ALORS sel_R..Valeur=1 SINON sel_R..Valeur=2 FIN sai_dr=Table1.Date_Reglement sai_mtr=Table1.Monatant_Reglement FIN Clic sur Modifier SI OuiNon(Non, «Voulez-vous modifiez cet enregistrement?")=Oui ALORS SI sel_R..Valeur=1 ALORS mr="Espèce" SINON mr="Cheque" FIN TableModifie(Table1,sai_nr+TAB+sai_nf+TAB+Combo..ValeurAffichée+TAB+mr+TAB+sai_dr+TAB+ sai_mtr) ExécuteTraitement (Autre1,trtClic) FIN
  • 5. Clic sur Fermer SI OuiNon (Non, «Voulez-vous quitter?»)=Oui ALORS FinProgramme() FIN Clic sur Supprimer SI OuiNon(Non, «voulez-vous supprimer ce règlement?")=Oui ALORS TableSupprime(Table1,r) //---------recalcule des montant------------- ligne est entier totalht est un réel tesp est un réel tch est un réel POUR ligne=1 A TableOccurrence(Table1) TableSelectPlus(Table1,ligne) totalht=totalht+Table1.Monatant_Reglement//-cumul des montants ht //-------------calcul de total facture espèce--------------// SI Table1.Mode_Reglement="Espece" ALORS tesp=tesp+Table1.Monatant_Reglement SINON tch=tch+Table1.Monatant_Reglement FIN FIN sai_t=totalht sai_Tch=tesp sai_tesp=tch sai_nbf=TableOccurrence(Table1) //----------Exécuter le traitement clic de bouton autre----------- ExécuteTraitement(Autre1,trtClic) FIN
  • 6. Bouton gauche double clic sai_nr=Table1.NRegelemt sai_nf=Table1.Nfacture SI Table1.Operation="Vente" ALORS Combo..Valeur=1 SINON Combo..Valeur=2 FIN SI Table1.Mode_Reglement="Espece" ALORS sel_R..Valeur=1 SINON sel_R..Valeur=2 FIN sai_dr=Table1.Date_Reglement sai_mtr=Table1.Monatant_Reglement Attention : Il faut tout d’abord ajouter cet évènement en cliquant ici