def init(self): try: cursor = self.data.cursor() result = cursor.execute( "SELECT distinct numEq FROM LesEquipes UNION SELECT distinct numSp FROM LesSportifs " ) except Exception as e: display.refreshLabel( self.ui.titre, "Impossible de récupérer les sportifs et les équipes pour la modification : " + repr(e)) else: for row_num, row_data in enumerate(result): self.ui.numIn_Modification.addItem(str(row_data[0])) self.ui.numIn_Modification.setCurrentText(self.numIn) try: cursor = self.data.cursor() result = cursor.execute("SELECT distinct numEp FROM LesEpreuves") except Exception as e: display.refreshLabel( self.ui.titre, "Impossible de récupérer les sportifs et les équipes pour l'ajout : " + repr(e)) else: for row_num, row_data in enumerate(result): self.ui.numEp_Modification.addItem(str(row_data[0])) self.ui.numEp_Modification.setCurrentText(self.numEp)
def refreshDossierSupp(self): display.refreshLabel(self.ui.label_4, "") if not self.ui.lineEdit_2.text().strip(): self.ui.tableWidget_2.setRowCount(0) display.refreshLabel(self.ui.label_4, "Veuillez indiquer un numéro de dossier") else: try: cursor = self.data.cursor() result = cursor.execute( "SELECT nomSpec,dateRep,noRang,noPlace,libelleCat FROM LesTickets NATURAL JOIN LesSpectacles WHERE noDos = ?", [int(self.ui.lineEdit_2.text().strip())]) except Exception as e: self.ui.tableWidget_2.setRowCount(0) display.refreshLabel( self.ui.label_4, "Impossible d'afficher ce dossier : " + repr(e)) else: i = display.refreshGenericData(self.ui.tableWidget_2, result) display.refreshLabel(self.ui.label_4, "Cliquez sur le ticket à supprimer") if i == 0: display.refreshLabel( self.ui.label_4, "Ce dossier n'existe pas, veuillez saisir un numéro de dossier valide" )
def init(self): self.ui.numIn_Ajout.clear() self.ui.numIn_Modification.clear() self.ui.numIn_Suppression.clear() self.ui.numEp_Ajout.clear() self.ui.numEp_Modification.clear() self.ui.numEp_Suppression.clear() # Chargements des inscrits try: cursor = self.data.cursor() result = cursor.execute( "SELECT distinct numEq FROM LesEquipes UNION SELECT distinct numSp FROM LesSportifs ") except Exception : display.refreshLabel(self.ui.titre, "Impossible de récupérer les sportifs et les équipes pour l'ajout : " + repr(e)) else: display.refreshGenericCombo(self.ui.numIn_Ajout, result) # Chargements des epreuves try: cursor = self.data.cursor() result = cursor.execute("SELECT distinct numEp FROM LesEpreuves") except Exception : display.refreshLabel(self.ui.titre, "Impossible de récupérer les épreuves : " + repr(e)) else: for row_num, row_data in enumerate(result): self.ui.numEp_Ajout.addItem(str(row_data[0])) self.ui.numEp_Modification.addItem(str(row_data[0])) self.ui.numEp_Suppression.addItem(str(row_data[0]))
def suppr(self): display.refreshLabel(self.ui.label_fct_comp_7, "") try: cursor = self.data.cursor() noSpecReq = cursor.execute("SELECT noSpec FROM LesSpectacles WHERE nomSpec = ?", [str(self.ui.comboBox_ajout_fct_comp_7.currentText())]) # récupération du noSpec noSpec = list(noSpecReq)[0][0] # récupérationn de la dateRep dateRepr = self.ui.comboBox_suppr_fct_comp_7_2.currentText() #suppréssion de la représentation result = cursor.execute("DELETE FROM LesRepresentations_base WHERE noSpec = ? AND dateRep = ?", [noSpec, dateRepr]) # suppression des tickets de cette représentaions result = cursor.execute("DELETE FROM LesTickets WHERE noSpec = ? AND dateRep = ?", [noSpec, dateRepr]) result = cursor.execute("DELETE FROM LesDossiers_base WHERE noDos not in (SELECT noDos from LesTickets)") # mise à jour persistante de la base de donnée result = cursor.execute("COMMIT") self.refreshResult() except Exception as e: display.refreshLabel(self.ui.label_fct_comp_7, "Impossible d'afficher les résultats : " + repr(e))
def refreshResult(self): # display.refreshLabel(self.ui.label_fct_comp_representation, "") try: cursor1 = self.data.cursor() result1 = cursor1.execute( "SELECT noSpec,dateRep FROM LesRepresentations_base") for row in result1: cursor2 = self.data.cursor() result2 = cursor2.execute( "SELECT noSpec, dateRep FROM LesTickets WHERE noSpec = ? AND dateRep = ?", [row[0], row[1]]) for row1 in result2: cursor3 = self.data.cursor() result3 = cursor3.execute( "SELECT noSpec,dateRep, count(*) FROM LesTickets where noSpec = ? AND dateRep = ?", [row1[0], row1[1]]) display.refreshGenericData1(self.ui.tableresultat, result3) except Exception as e: self.ui.tableresultat.setRowCount(0) display.refreshLabel( self.ui.label_res, "Impossible d'afficher les résultats : " + repr(e))
def ajouter(self): display.refreshLabel(self.ui.label_fct_comp_7, "") try: cursor = self.data.cursor() # conditions pour que l'ajout ce fasse et que on ne peut pas vérifier en SQL if self.ui.comboBox_ajout_fct_comp_7.currentText() == "": raise Exception("no Spec") result = cursor.execute("SELECT dateRep FROM LesRepresentations WHERE dateRep = ?", [str(self.ui.dateTimeEdit.date())]) print(list(result)) if len(result.fetchall()) != 0: raise Exception("Representation existante ou salle prise") if self.ui.doubleSpinBox.value() > 1 or self.ui.doubleSpinBox.value() <= 0: raise Exception("Promo doit être compris entre 0 et 1") # récupération du noSpec noSpecReq = cursor.execute("SELECT noSpec FROM LesSpectacles WHERE nomSpec = ?", [str(self.ui.comboBox_ajout_fct_comp_7.currentText())]) noSpecRepr = list(noSpecReq)[0][0] # récupération de la dateRep dateRepr = self.ui.dateTimeEdit.dateTime().toPyDateTime() dateRepr = dateRepr.strftime("%d/%m/%Y %H:%M") result = cursor.execute("INSERT INTO LesRepresentations_base (noSpec, dateRep, promoRep) VALUES(?, ?, ?)", [int(noSpecRepr), dateRepr, self.ui.doubleSpinBox.value()]) # mise à jour persistante de la base de donnée result = cursor.execute("COMMIT") self.refreshResult() except Exception as e: display.refreshLabel(self.ui.label_fct_comp_7, "Impossible d'afficher les résultats : " + repr(e))
def refreshSupp(self): display.refreshLabel(self.ui.label_5, "") # on récupère le numéro du spectacle concerné if not self.ui.comboBox_2.currentText(): self.ui.tableWidget.setRowCount(0) display.refreshLabel(self.ui.label_5, "Veuillez sélectionner un spectacle") else: cursor = self.data.cursor() cursor.execute( "SELECT noSpec FROM LesSpectacles WHERE nomSpec = ?", [self.ui.comboBox_2.currentText()]) numSpec = cursor.fetchone() binding = numSpec[0] try: cursor = self.data.cursor() result = cursor.execute( "SELECT dateRep, promoRep FROM LesRepresentations_base WHERE noSpec = ?", [binding]) except Exception as e: self.ui.tableWidget.setRowCount(0) display.refreshLabel( self.ui.label_5, "Impossible d'afficher les représentations : " + repr(e)) else: i = display.refreshGenericData(self.ui.tableWidget, result) display.refreshLabel( self.ui.label_5, "Cliquez sur la représentation à supprimer") if i == 0: display.refreshLabel( self.ui.label_5, "Il n'y a pas de représentations pour ce spectacle")
def refreshIns(self): display.refreshLabel(self.ui.label_3, "") try: cursor = self.data.cursor() cursor.execute( "SELECT noSpec FROM LesSpectacles WHERE nomSpec = ?", [self.ui.comboBox.currentText()]) numSpec = cursor.fetchone() cursor.execute( "INSERT INTO LesRepresentations_base(noSpec,dateRep,promoRep) VALUES (?,?,?)", [ numSpec[0], self.ui.dateTimeEdit.dateTime().toString( 'dd/MM/yyyy hh:mm'), self.ui.doubleSpinBox.value() ]) except TypeError: display.refreshLabel( self.ui.label_3, "Échec de l'ajout : veuillez choisir un spectacle!") except sqlite3.IntegrityError: display.refreshLabel( self.ui.label_3, "Échec de l'ajout : cette représentation existe déjà!") except Exception as e: display.refreshLabel( self.ui.label_3, "Impossible d'ajouter cette représentation : " + repr(e)) else: display.refreshLabel(self.ui.label_3, "Ajout de représentation réussie!") self.data.commit()
def refreshBronze(self): try: cursor = self.data.cursor() if self.ui.radioButton_insert.isChecked(): equipeBronze = cursor.execute( "SELECT numIn FROM lesInscriptions WHERE numEp=? AND numIn<>? AND numIn<>?", [ self.ui.comboBox_numEp.currentText(), self.ui.comboBox_gold.currentText(), self.ui.comboBox_silver.currentText() ]) elif self.ui.radioButton_update.isChecked(): equipeBronze = cursor.execute( "SELECT numIn FROM lesInscriptions WHERE numEp=? AND numIn<>(SELECT bronze from lesResultats where numEp=? and numIn<>? and numIn<>?)", [ self.ui.comboBox_numEp.currentText(), self.ui.comboBox_numEp.currentText(), self.ui.comboBox_gold.currentText(), self.ui.comboBox_silver.currentText() ]) else: equipeBronze = cursor.execute( "SELECT bronze FROM lesResultats WHERE numEp=?", [self.ui.comboBox_numEp.currentText()]) except Exception as e: display.refreshLabel(self.ui.label_erreur, "Impossible de gerer les places : " + repr(e)) else: display.refreshGenericCombo(self.ui.comboBox_bronze, equipeBronze)
def insertResult(self): try: identite = self.ui.comboBox_part_3_3_numSp.currentText().split() cursor = self.data.cursor() result = cursor.execute( "SELECT numSp FROM LesSportifs_base WHERE prenomSp=? and nomSp=?", (identite[0], identite[1])) self.data.commit() num = [str(i[0]) for i in cursor.fetchall()] if self.checkBox_Delete.isChecked(): result = cursor.execute( "DELETE FROM LesEquipiers WHERE numEq=? AND numSp=?;", (self.comboBox_part_3_3_numEq.currentText(), num[0])) else: result = cursor.execute( "INSERT INTO LesEquipiers (numSp, numEq) VALUES (?, ?);", (num[0], self.comboBox_part_3_3_numEq.currentText())) self.data.commit() except Exception as e: display.refreshLabel( self.ui.label_part_3_3, "Impossible de mettre à jour l'équipe : " + repr(e)) print(repr(e)) else: display.refreshLabel(self.ui.label_part_3_3, "Equipe mis à jour") self.initialiserSportifs()
def refreshResult(self): try: cursor = self.data.cursor() result = cursor.execute("SELECT * FROM LesTickets") except Exception as e: self.ui.table_fct_comp.setRowCount(0) else: i = display.refreshGenericData(self.ui.table_fct_comp, result) if i == 0: display.refreshLabel(self.ui.label_11, "Aucun résultat")
def refreshCatList(self): try: cursor = self.data.cursor() result = cursor.execute("SELECT catZone FROM LesZones") except Exception as e: self.ui.comboBox_fct_comp_3.clear() display.refreshLabel(self.ui.label_fct_comp_3, "Aucune catégorie trouvée") else: display.refreshGenericCombo(self.ui.comboBox_fct_comp_3, result)
def refreshTable(self, label, table, query): display.refreshLabel(label, "") try: cursor = self.data.cursor() result = cursor.execute(query) except Exception as e: table.setRowCount(0) display.refreshLabel(label, "Impossible d'afficher les données de la table : " + repr(e)) else: display.refreshGenericData(table, result)
def refreshResult(self): #display.refreshLabel(self.ui.label_fct_comp_representation, "") try: cursor = self.data.cursor() result = cursor.execute("SELECT noSpec,nomSpec,dateRep,count(*) FROM LesSpectacles natural join LesRepresentations_base natural join LesTickets GROUP BY noSpec, nomSpec,dateRep,noRang,noPlace") except Exception as e: self.ui.tableresultat.setRowCount(0) display.refreshLabel(self.ui.label_res, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.tableresultat, result)
def refreshResult(self): try: cursor = self.data.cursor() result = cursor.execute("WITH list_pays(id,pays) as (SELECT DISTINCT numSp as id, pays FROM LesSportifs UNION SELECT DISTINCT numEq, pays FROM LesEquipiers JOIN LesSportifs USING (numSp)),res_or(pays,nbOr) AS (SELECT pays, count(gold) as nbOr FROM list_pays LEFT JOIN LesResultats ON (id=gold) GROUP BY pays), res_silver(pays,nbArgent) as (SELECT pays, count(silver) as nbArgent FROM list_pays LEFT JOIN LesResultats ON (id=silver) GROUP BY pays),res_bronze(pays,nbBronze) as (SELECT pays, count(bronze) as nbBronze FROM list_pays LEFT JOIN LesResultats ON (id=bronze) GROUP BY pays) SELECT pays,nbOr,nbArgent,nbBronze FROM res_or JOIN res_silver USING (pays) JOIN res_bronze USING (pays) ORDER BY nbOr DESC, nbArgent DESC, nbBronze DESC") except Exception as e: self.ui.table_fct_part_2_2.setRowCount(0) display.refreshLabel(self.ui.label_fct_part_2_2, "Impossible d'afficher les résultats : " + repr(e)) else: i = display.refreshGenericData(self.ui.table_fct_part_2_2, result) if i == 0: display.refreshLabel(self.ui.label_fct_part_2_2, "Aucun résultat")
def refreshResult(self): display.refreshLabel(self.ui.label_fct_comp_1, "") try: cursor = self.data.cursor() result = cursor.execute("SELECT noSpec, dateRep, noPlace, noRang, dateEmTick, noDos FROM LesTickets") except Exception as e: self.ui.table_fct_comp_1.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_1, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.table_fct_comp_1, result)
def refreshCatList2(self): display.refreshLabel(self.ui.label_fct_comp_4, "Choisir le equipe") try: cursor = self.data.cursor() result = cursor.execute( "SELECT DISTINCT E.numEq FROM LesSportifs_base S LEFT OUTER JOIN LesEquipiers E ON S.numSp=E.numSp WHERE pays=?", [self.ui.comboBox_fct_4_pays.currentText()]) except Exception as e: self.ui.comboBox_fct_4_equipe.clear() else: display.refreshGenericCombo(self.ui.comboBox_fct_4_equipe, result)
def changedModification(self): try: cursor = self.data.cursor() result = cursor.execute("SELECT distinct numIn FROM LesInscriptions WHERE numEp = ?", [self.ui.numEp_Modification.currentText()]) except Exception as e: display.refreshLabel(self.ui.titre, "Erreur de chargement des champs modification : Inscrits : " + repr(e)) else: display.refreshGenericCombo(self.ui.numIn_Modification, result)
def refreshResult(self): display.refreshLabel(self.ui.label_fct_comp_6, "") try: cursor = self.data.cursor() result = cursor.execute( "SELECT noSpec, dateRep, COUNT(*) AS nbrPlacesR FROM LesTickets GROUP BY noSpec, dateRep") except Exception as e: self.ui.table_fct_comp_6.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_6, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.table_fct_comp_6, result)
def refreshResult(self): display.refreshLabel(self.ui.label_fct_comp_1, "") try: cursor = self.data.cursor() # TODO 1.1 : mettre à jour la requête et changer aussi le fichier ui correspondant result = cursor.execute("SELECT noSpec, dateRep, noPlace, noRang, dateEmTick, noDos FROM LesTickets") except Exception as e: self.ui.table_fct_comp_1.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_1, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.table_fct_comp_1, result)
def Modifier(self): if self.ui.lineEdit_1.text().strip(): noSpec = self.ui.lineEdit_1.text().strip() else: noSpec = self.ui.noSpec_fct_combo.currentText() if self.ui.lineEdit_2.text().strip(): dateRep = self.ui.lineEdit_2.text().strip() else: dateRep = self.ui.dateRep_fct_combo.currentText() if self.ui.lineEdit_3.text().strip(): noRang = self.ui.lineEdit_3.text().strip() else: noRang = self.ui.noRang_fct_combo.currentText() if self.ui.lineEdit_4.text().strip(): noPlace = self.ui.lineEdit_4.text().strip() else: noPlace = self.ui.noPlace_fct_combo.currentText() if self.ui.lineEdit_5.text().strip(): libelleCat = self.ui.lineEdit_5.text().strip() else: libelleCat = self.ui.libelleCat_fct_combo.currentText() if self.ui.lineEdit_6.text().strip(): noDos = self.ui.lineEdit_6.text().strip() else: noDos = self.ui.noDos_fct_combo.currentText() try: cursor = self.data.cursor() # Update la reservation séléctionnée cursor.execute( "UPDATE LesTickets SET noSpec = ?, dateRep = ?, noRang = ? , noPlace = ?, libelleCat = ?, noDos = ? WHERE noSpec = ? AND dateRep = ? AND noRang = ? AND noPlace = ? AND libelleCat = ? AND noDos = ?", [ noSpec, dateRep, noRang, noPlace, libelleCat, noDos, self.ui.noSpec_fct_combo.currentText(), self.ui.dateRep_fct_combo.currentText(), self.ui.noRang_fct_combo.currentText(), self.ui.noPlace_fct_combo.currentText(), self.ui.libelleCat_fct_combo.currentText(), self.ui.noDos_fct_combo.currentText() ]) self.refreshAll() except Exception as e: display.refreshLabel(self.ui.label_11, "Modification Impossible : " + repr(e)) else: display.refreshLabel(self.ui.label_11, "l'operation est terminée avec succes")
def listCat(self): try: cursor = self.data.cursor() requete = "SELECT distinct categorieEp FROM lesEpreuves" categories = cursor.execute(requete) except Exception as e: display.refreshLabel( self.ui.label_fct_comp_3, "Impossible d'afficher les résultats : " + repr(e)) self.ui.comboBox_fct_comp_3.clear() else: display.refreshGenericCombo(self.ui.comboBox_fct_comp_3, categories)
def refreshResult(self): display.refreshLabel(self.ui.label_fct_fournie_1, "") try: cursor = self.data.cursor() result = cursor.execute( "SELECT noSpec, dateRep FROM LesRepresentations WHERE nbPlacesDispoRep = (SELECT count(noPlace) FROM LesPlaces)" ) except Exception as e: self.ui.table_fct_fournie_1.setRowCount(0) display.refreshLabel( self.ui.label_fct_fournie_1, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.table_fct_fournie_1, result)
def refreshResult(self): # TODO 1.5 : fonction à modifier pour remplacer la zone de saisie par une liste de valeurs prédéfinies dans l'interface une fois le fichier ui correspondant mis à jour display.refreshLabel(self.ui.label_fct_comp_2, "") button_binding = None if self.ui.radioButton.isChecked(): button_binding = self.ui.radioButton.text() if self.ui.radioButton_2.isChecked(): button_binding = self.ui.radioButton_2.text() if self.ui.radioButton_3.isChecked(): button_binding = self.ui.radioButton_3.text() if button_binding is None: self.ui.table_fct_comp_2.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_2, "Veuillez sélectionner un nom de catégorie") else: try: cursor = self.data.cursor() result = cursor.execute( "SELECT noPlace, noRang, noZone FROM LesZones NATURAL JOIN LesPlaces WHERE catZone = ?", [button_binding]) except Exception as e: self.ui.table_fct_comp_2.setRowCount(0) display.refreshLabel( self.ui.label_fct_comp_2, "Impossible d'afficher les résultats : " + repr(e)) else: i = display.refreshGenericData(self.ui.table_fct_comp_2, result) if i == 0: display.refreshLabel(self.ui.label_fct_comp_2, "Aucun résultat")
def addFolder(self): try: cursor = self.data.cursor() cursor.execute( "INSERT INTO LesDossiers_base(noDos) " "VALUES ((SELECT max(noDos)+1 FROM LesDossiers_base))") except Exception as e: display.refreshLabel( self.ui.label_error_fct_comp_8, "Erreur lors de la création du dossier : " + repr(e)) else: display.refreshLabel(self.ui.label_error_fct_comp_8, "Nouveau dossier créé avec succès.") self.refreshCurrentFolder()
def refreshResult(self): display.refreshLabel(self.ui.label_fct_comp_3, "") if not self.ui.cb_fct_comp_3.currentText(): self.ui.table_fct_comp_3.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_3, "Veuillez indiquer un nom de catégorie") else: try: cursor = self.data.cursor() result = cursor.execute( "SELECT numEp, nomEp, formeEp, nomDi, nbSportifsEp, dateEp FROM LesEpreuves WHERE categorieEp = ?", [self.ui.cb_fct_comp_3.currentText()]) except Exception as e: self.ui.table_fct_comp_3.setRowCount(0) display.refreshLabel( self.ui.label_fct_comp_3, "Impossible d'afficher les résultats : " + repr(e)) else: i = display.refreshGenericData(self.ui.table_fct_comp_3, result) if i == 0: display.refreshLabel(self.ui.label_fct_comp_3, "Aucun résultat")
def refreshResult(self): # TODO 1.7 : fonction à modifier pour que l'équipe ne propose que des valeurs possibles pour le pays choisi display.refreshLabel(self.ui.label_fct_comp_4, "") if self.ui.comboBox_fct_4_equipe.count() != 0: try: cursor = self.data.cursor() result = cursor.execute( "SELECT numSp, nomSp, prenomSp, categorieSp, dateNaisSp FROM LesSportifs_base JOIN LesEquipiers USING (numSp) WHERE pays = ? AND numEq=?", [ self.ui.comboBox_fct_4_pays.currentText(), self.ui.comboBox_fct_4_equipe.currentText() ]) except Exception as e: self.ui.table_fct_comp_4.setRowCount(0) display.refreshLabel( self.ui.label_fct_comp_4, "Impossible d'afficher les résultats : " + repr(e)) else: i = display.refreshGenericData(self.ui.table_fct_comp_4, result) if i == 0: display.refreshLabel(self.ui.label_fct_comp_4, "Aucun résultat") else: self.ui.table_fct_comp_4.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_4, "Aucun résultat")
def refreshResult(self): display.refreshLabel(self.ui.label_fct_comp_1, "") if not self.ui.lineEdit.text().strip(): self.ui.table_fct_comp_1.setRowCount(0) display.refreshLabel(self.ui.label_fct_comp_1, "Veuillez indiquer un numéro d'équipe") else: try: cursor = self.data.cursor() # TODO 1.1 : mettre à jour la requête pour ajouter dateNaisSp et changer aussi le fichier ui correspondant result = cursor.execute( "SELECT nomSp, prenomSp, pays, categorieSp,dateNaisSp FROM LesSportifs_base JOIN LesEquipiers USING (numSp) WHERE numEq = ?", [self.ui.lineEdit.text().strip()]) except Exception as e: self.ui.table_fct_comp_1.setRowCount(0) display.refreshLabel( self.ui.label_fct_comp_1, "Impossible d'afficher les résultats : " + repr(e)) else: i = display.refreshGenericData(self.ui.table_fct_comp_1, result) if i == 0: display.refreshLabel(self.ui.label_fct_comp_1, "Aucun résultat")
def ajouterRes(self): try: cursor = self.data.cursor() cursor.execute("INSERT INTO LesInscriptions(numIn,numEp) VALUES (?,?) ", [self.ui.numIn_Ajout.currentText(), self.ui.numEp_Ajout.currentText()] ) except Exception as e: display.refreshLabel(self.ui.titre, "Erreur d'ajout d'une inscription : " + repr(e)) else: display.refreshLabel(self.ui.titre, "L'inscription à été ajoutée") self.changedSuppression() self.changedModification()
def refreshResult(self): display.refreshLabel(self.ui.label_fct_fournie_1, "") try: cursor = self.data.cursor() result = cursor.execute( "SELECT nomSp, prenomSp, pays, categorieSp FROM LesSportifs_base JOIN LesEquipiers USING (numSp) WHERE numEq = 1" ) except Exception as e: self.ui.table_fct_fournie_1.setRowCount(0) display.refreshLabel( self.ui.label_fct_fournie_1, "Impossible d'afficher les résultats : " + repr(e)) else: display.refreshGenericData(self.ui.table_fct_fournie_1, result)