IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

WinDev Discussion :

Recherche de L'aide


Sujet :

WinDev

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut Recherche de L'aide
    salut je cherche de l'aide
    j'ai un ecran commande avec un champ table listant pour une commande les differentes lignes de commande
    avec un bouton validé dans lequel j'utilise tableAffiche(tableCommande,taDebut)
    pour rafraichir la table aprés chaque commande,de l'autre coté jai un ecran listant les commandes avec un button modifié
    qui ouvre l'ecran commande
    mais ici quand je modifie une commande la table ne se rafraichit pas
    je vudrais une solution qui me permet de la rafraichir aprés une modification.
    NB: j'utilise un HFiltre(lignCommande,IDCommande,Commande.IDCommande) et HDésactiveFiltre(lignCommande) a la fermeture de Fen_Commande

  2. #2
    Membre expérimenté
    Profil pro
    Inscrit en
    Avril 2010
    Messages
    914
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2010
    Messages : 914
    Points : 1 496
    Points
    1 496
    Par défaut
    Bonjour
    Utilisez la meme
    Tableaffiche

  3. #3
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut
    EN faite la modification s'effectue sur l'ecran commande apartir du boutton validé

  4. #4
    Membre confirmé
    Homme Profil pro
    Admin - Gestion reconverti en informatique
    Inscrit en
    Septembre 2017
    Messages
    328
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Admin - Gestion reconverti en informatique

    Informations forums :
    Inscription : Septembre 2017
    Messages : 328
    Points : 493
    Points
    493
    Par défaut
    Bonjour,
    la solution vous a été donnée.
    un coup de pouce
    Dans le code du bouton Modifier
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    Ouvre(MaFenêtre...)    // ouverture fenêtre table avec lignes de la commande
    // rajouter ceci
    TableAffiche(MaTable_Liste,taCourantBandeau)
    N.B : dans le code du bouton Valider (Fen_Commande), vous allez mettre à jour, le fichier commande soit IDCommande en cours.

  5. #5
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut
    J'ai déja fait tout cela , en faite quand je modifie , la modification prend.
    je voudrais juste que la table se vide des enregistrements qu'elle contient pour que je puisse effectuer une nouvelle commande

  6. #6
    Expert confirmé
    Avatar de Voroltinquo
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Juin 2017
    Messages
    2 807
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Chef de projet en SSII

    Informations forums :
    Inscription : Juin 2017
    Messages : 2 807
    Points : 5 263
    Points
    5 263
    Billets dans le blog
    1
    Par défaut
    Bonjour,
    Es-tu allé voir du côté de TableSupprimeTout
    Il y a peut-être plus simple, mais ça tourne.
    Quand tout a échoué utilisez l'option RTFM

  7. #7
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut
    Salut à tous , voici le code de mon boutton VALIDER

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    SI TABLE_LignCommande..Occurrence = 0 ALORS
    	Erreur("Vous devez  effectuer au moins une commande")
    	RETOUR
    FIN
     
    EcranVersFichier()
     
    SI Commande..NouvelEnregistrement ALORS
      HAjoute(Commande)
     
     
    SINON
     
    	HModifie(Commande)
     
    FIN
     
    POUR TOUTE LIGNE DE TABLE_LignCommande 
    	TABLE_LignCommande.COL_IDCommande = Commande.IDCommande
     
    	TableEnregistre(TABLE_LignCommande) 
     
    FIN
     
    TableAffiche(TABLE_LignCommande,taDebut)
     
     
    HLitDernier(Commande,IDCommande)
    SI HTrouve(Commande) ALORS
    	SAI_IDCommande = Commande.IDCommande + 1    
    FIN
     
    HRAZ(Commande)
    La Question est comment vider la table aprés une modification. je précise que quand c'est un ajout , la table se vide sans probléme

  8. #8
    Expert confirmé
    Avatar de Voroltinquo
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Juin 2017
    Messages
    2 807
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Chef de projet en SSII

    Informations forums :
    Inscription : Juin 2017
    Messages : 2 807
    Points : 5 263
    Points
    5 263
    Billets dans le blog
    1
    Par défaut
    Dans un premier temps, comme ça ce sera plus lisible. Il suffit d'appuyer sur le bouton # puis de coller ton code.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
     
    SI TABLE_LignCommande..Occurrence = 0 ALORS
         Erreur("Vous devez effectuer au moins une commande")
         RETOUR
    FIN
     
    EcranVersFichier()
     
    SI Commande..NouvelEnregistrement ALORS
         HAjoute(Commande)
    SINON
         HModifie(Commande)
    FIN
     
    POUR TOUTE LIGNE DE TABLE_LignCommande
         TABLE_LignCommande.COL_IDCommande = Commande.IDCommande
         TableEnregistre(TABLE_LignCommande)
    FIN
     
    TableAffiche(TABLE_LignCommande,taDebut)
     
     
    HLitDernier(Commande,IDCommande)
    SI HTrouve(Commande) ALORS
         SAI_IDCommande = Commande.IDCommande + 1
    FIN
     
    HRAZ(Commande)
    Il y a peut-être plus simple, mais ça tourne.
    Quand tout a échoué utilisez l'option RTFM

  9. #9
    Expert confirmé
    Avatar de Voroltinquo
    Homme Profil pro
    Chef de projet en SSII
    Inscrit en
    Juin 2017
    Messages
    2 807
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Chef de projet en SSII

    Informations forums :
    Inscription : Juin 2017
    Messages : 2 807
    Points : 5 263
    Points
    5 263
    Billets dans le blog
    1
    Par défaut
    Dans un deuxième temps :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    SI Commande..NouvelEnregistrement ALORS
         HAjoute(Commande)
    SINON
         HModifie(Commande)
    FIN
    Peut être remplacé par Venons en maintenant à ton problème.
    Tu rafraichis ton champ table avant d'avoir initialisé une nouvelle commande. Donc ton filtre prend en compte cette ID
    Il faut rafraichir après le HRAZ().
    Nouvelle commande=ID inexistante dans ta table Ligne commande donc le champ associé sera vierge
    Il y a peut-être plus simple, mais ça tourne.
    Quand tout a échoué utilisez l'option RTFM

  10. #10
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut
    Bonjour à tous Mr Voroltinquo j'ai essayé votre solution mais ça ne marche toujours pas

  11. #11
    Membre confirmé
    Homme Profil pro
    Admin - Gestion reconverti en informatique
    Inscrit en
    Septembre 2017
    Messages
    328
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Admin - Gestion reconverti en informatique

    Informations forums :
    Inscription : Septembre 2017
    Messages : 328
    Points : 493
    Points
    493
    Par défaut
    Bonjour,

    Dans le code bouton Valider, rajouter : HFiltre(lignCommande,IDCommande,0)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    -----------
    -----------
    POUR TOUTE LIGNE DE TABLE_LignCommande
            TABLE_LignCommande.COL_IDCommande = Commande.IDCommande
            TableEnregistre(TABLE_LignCommande)
    FIN
     
    // rajouter ici
    HFiltre(lignCommande,IDCommande,0) 
    TableAffiche(TABLE_LignCommande,taDebut)
    ---------
    ---------

  12. #12
    Membre confirmé
    Homme Profil pro
    Admin - Gestion reconverti en informatique
    Inscrit en
    Septembre 2017
    Messages
    328
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Admin - Gestion reconverti en informatique

    Informations forums :
    Inscription : Septembre 2017
    Messages : 328
    Points : 493
    Points
    493
    Par défaut
    remarque : autre solution
    Il n'est pas nécessaire, à chaque validation, de filtrer de nouveau, la
    table ligne commande.
    En cas de rajout de commande, le filtre activé est toujours IDCommande = 0
    Seulement en cas de modif, le IDCommande est différent de zéro, c'est dans ce cas, il faut modifier la condition du filtre.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
     
    -----------
    -----------
    POUR TOUTE LIGNE DE TABLE_LignCommande
            TABLE_LignCommande.COL_IDCommande = Commande.IDCommande
            TableEnregistre(TABLE_LignCommande)
    FIN
     
    // rajouter ceci
    SI Commande..NouvelEnregistrement=Faux ALORS
         HFiltre(lignCommande,IDCommande,0) 
    FIN
    TableAffiche(TABLE_LignCommande,taDebut)
    ---------
    ---------

  13. #13
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2015
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2015
    Messages : 22
    Points : 11
    Points
    11
    Par défaut
    Merci midou Votre solution à fonctionner ,
    Merci à tous

Discussions similaires

  1. [Planning] Recherche composant ou aide
    Par Shivaneth dans le forum Struts 1
    Réponses: 8
    Dernier message: 08/08/2007, 18h56
  2. Réponses: 1
    Dernier message: 23/05/2007, 22h12
  3. [Dates] recherche script et aide bonus aux clics
    Par oceanne dans le forum Langage
    Réponses: 15
    Dernier message: 01/05/2007, 11h20
  4. [AJAX] [recherche] tutoriaux et aide AJAX
    Par yanchasp dans le forum Général JavaScript
    Réponses: 6
    Dernier message: 29/05/2006, 16h13
  5. Recherche recursive à l'aide des expressions reguliére
    Par titoff dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 20/12/2005, 16h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo