Commit a90da4d96031ed0cf5a9749d9fa53804d13d900d

Authored by Babacar Thiam
0 parents
Exists in master

update data create and chargement

README 0 → 100755
  1 +++ a/README
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
  1 +chargementSGDEexcelsans btl Version 1.2 installation guide
  2 +
  3 +
  4 +1- Installation on Linux/Unix
  5 +
  6 +To install the sGDE_IsmerQO package, you must install
  7 +the Python Programming Language environnement on your system.
  8 +The Python software is available for download at http://www.python.org.
  9 +
  10 +Once python is installed on your system, simply download the
  11 +sGDE_IsmerQO package from the gitlasso
  12 +The package for Linux/Unix comes
  13 +as a gzip tar file. To install, follow these steps:
  14 +
  15 +1- tar zxvf sGDE_IsmerQO-1.2.tar.gz
  16 +(or gunzip -c sGDE_IsmerQO-1.2.tar.gz | tar xvf -)
  17 +2- cd sGDE_IsmerQO-1.2/src
  18 +3- su - root (become superuser)
  19 +4- python setup.py install
  20 +
  21 +And sGDE_IsmerQO should now be
  22 +available for execution.
  23 +
  24 +
  25 +2- Installation of the source code on Windows
  26 +
  27 +To install the sGDE_IsmerQO package, you must install
  28 +the Python Programming Language environnement on your system.
  29 +The Python software is available for download at http://www.python.org.
  30 +
  31 +Once python is installed on your system, simply download the
  32 +sGDE_IsmerQO package from the gitlasso
  33 +The package for windows comes Windows comes as a zip file.
  34 + To install, follow these steps:
  35 +
  36 +1- Download the zip file to a directory such as c:\temp
  37 +2- Unzip sGDE_IsmerQO-1.2.zip
  38 +3- Open a command window
  39 +4- cd c:\temp\sGDE_IsmerQO-1.2\src
  40 +5- python setup.py install
  41 +
  42 +
  43 +sGDE_IsmerQO.py should now be
  44 +available for execution and will have been copied to the Scripts directory of your Python
  45 +installation (e.g., c:\Python24\Scripts). In order to use
  46 +the sGDE_IsmerQO.py package from anywhere on your machine, you must
  47 +add this directory to your PATH environnement variable.
src/Makefile 0 → 100755
  1 +++ a/src/Makefile
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +#
  2 +#Makefile pour construire les paquets de
  3 +#distribution de odf2netcdf
  4 +
  5 +all:
  6 + python setup.py sdist --formats=gztar,zip
  7 + python setup.py bdist_wininst
src/README.md 0 → 100755
  1 +++ a/src/README.md
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
  1 +chargementSGDEexcelsans btl Version 1.2 installation guide
  2 +
  3 +
  4 +1- Installation on Linux/Unix
  5 +
  6 +To install the sGDE_IsmerQO package, you must install
  7 +the Python Programming Language environnement on your system.
  8 +The Python software is available for download at http://www.python.org.
  9 +
  10 +Once python is installed on your system, simply download the
  11 +sGDE_IsmerQO package from the gitlasso
  12 +The package for Linux/Unix comes
  13 +as a gzip tar file. To install, follow these steps:
  14 +
  15 +1- tar zxvf sGDE_IsmerQO-1.2.tar.gz
  16 +(or gunzip -c sGDE_IsmerQO-1.2.tar.gz | tar xvf -)
  17 +2- cd sGDE_IsmerQO-1.2
  18 +3- su - root (become superuser)
  19 +4- python setup.py install
  20 +
  21 +And sGDE_IsmerQO should now be
  22 +available for execution.
  23 +
  24 +
  25 +2- Installation of the source code on Windows
  26 +
  27 +To install the sGDE_IsmerQO package, you must install
  28 +the Python Programming Language environnement on your system.
  29 +The Python software is available for download at http://www.python.org.
  30 +
  31 +Once python is installed on your system, simply download the
  32 +sGDE_IsmerQO package from the gitlasso
  33 +The package for windows comes Windows comes as a zip file.
  34 + To install, follow these steps:
  35 +
  36 +1- Download the zip file to a directory such as c:\temp
  37 +2- Unzip sGDE_IsmerQO-1.2.zip
  38 +3- Open a command window
  39 +4- cd c:\temp\sGDE_IsmerQO-1.2
  40 +5- python setup.py install
  41 +
  42 +
  43 +sGDE_IsmerQO.py should now be
  44 +available for execution and will have been copied to the Scripts directory of your Python
  45 +installation (e.g., c:\Python24\Scripts). In order to use
  46 +the sGDE_IsmerQO.py package from anywhere on your machine, you must
  47 +add this directory to your PATH environnement variable.
src/__pycache__/gestionIntervenant.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestiongroupe.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestionjeudedonneesbis.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestionmission.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestionmotcle.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestionmotdict.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestionprojet.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/gestiontypjd.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/sGDE_IsmerQO.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/seconnecter.cpython-36.pyc 0 → 100644
No preview for this file type
src/__pycache__/testPostgres.cpython-36.pyc 0 → 100644
No preview for this file type
src/conn.py 0 → 100755
  1 +++ a/src/conn.py
@@ -0,0 +1,125 @@ @@ -0,0 +1,125 @@
  1 +import testPostgres as pf
  2 +import traceback
  3 +import sys
  4 +from tkinter import *
  5 +from tkinter import ttk, messagebox
  6 +import pandas as pd
  7 +import json
  8 +#import excel2nc as ex
  9 +#bd.cursor.execute("select nextval('seq_int')")
  10 +#resultat2=bd.cursor.fetchone()
  11 +#print(resultat2)
  12 +def geoliste(g):
  13 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  14 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  15 +def centrefenetre(fen):
  16 + fen.update_idletasks()
  17 + l,h,x,y=geoliste(fen.geometry())
  18 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  19 +
  20 +class ConnGraphic(Tk):
  21 +
  22 + def __init__(self):
  23 + Tk.__init__(self)
  24 + #self.minsize(1200,700)
  25 + self.title('connexion a la base de donnees')
  26 + self.creerWidgets()
  27 +
  28 +##interface pour la mission
  29 + def creerWidgets(self):
  30 + self.mainWindow = Frame(self, bg="blue")
  31 + self.mainWindow.pack(fill=BOTH, expand=1)
  32 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  33 + self.frameSaisie.pack(fill=BOTH)
  34 + self.frameResult10 = Frame(self.mainWindow)
  35 + self.frameResult10.pack(fill=BOTH)
  36 +
  37 + self.frameResult = Frame(self.frameResult10, bd=4, relief=SUNKEN)
  38 + self.frameResult.pack(side=LEFT,fill=X)
  39 + self.ent_label = Label(self.frameResult,font=('arial',50,'bold'),bd=4,bg="blue", fg="white", text="Information de connection:")
  40 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  41 + self.ent_label.pack(side=TOP,padx=5, pady=5)
  42 +
  43 + self.frameResult00 = Frame(self.frameResult, bd=4, relief=SUNKEN)
  44 + self.frameResult00.pack(fill=BOTH,padx=5, pady=5)
  45 + self.modified_label53321 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "host:")
  46 + #self.modified_label53321.configure(font=('Helvetica', 12))
  47 + #self.modified_label53321.pack(side=LEFT,padx=5, pady=5)
  48 + self.modified5332100=StringVar()
  49 + self.modified_entry53321= Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified5332100)
  50 +
  51 + self.modified_label53321.grid(row =0)
  52 + self.modified_entry53321.grid(row =0, column=1)
  53 + #self.modified_entry53321.pack(side=LEFT,padx=5, pady=5)
  54 + #self.modified_entry53321.focus()
  55 + #self.frameResult21 = Frame(self.frameResult10, bd=2, relief=SUNKEN)
  56 + #self.frameResult21.pack(side=LEFT,fill=Y)
  57 + self.modified_label51 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "db info:")
  58 + #self.modified_label51.configure(font=('Helvetica', 12))
  59 + #self.modified_label51.pack(side=LEFT,padx=25, pady=25)
  60 + self.modified_label51.grid(row =1, column =0)
  61 +
  62 + self.modified51=StringVar()
  63 + self.modified_entry51=Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified51)
  64 + self.modified_entry51.grid(row =1, column =1)
  65 + self.modified_label4 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "User:")
  66 + #self.modified_label4.configure(font=('Helvetica', 12))
  67 + #self.modified_label4.pack(side=LEFT,padx=25, pady=25)
  68 + #self.modified_label4.grid(row =0,column =4)
  69 + self.modified4=StringVar()
  70 + self.modified_entry4 = Entry(self.frameResult00,font=('arial',50,'bold'),bd=4,textvariable=self.modified4)
  71 + self.modified_entry4.grid(row =2, column =1)
  72 + self.modified_label4.grid(row =2, column =0)
  73 + #self.modified_entry4.pack(side=LEFT,padx=25, pady=25)
  74 + #self.modified_entry4.focus()
  75 + # self.modified_entry4.grid(row =1,column =4)
  76 +
  77 + #self.frameResult2112 = Frame(self.frameResult, bd=2, relief=SUNKEN)
  78 + #self.frameResult2112.pack(side=LEFT,fill=Y)
  79 + self.modified_label5 = Label(self.frameResult00,font=('arial',50,'bold'),bd=4, text = "Password:")
  80 + #self.modified_label5.configure(font=('Helvetica', 12))
  81 + self.modified_label5.grid(row =3, column =0)
  82 +
  83 + #self.modified_label5.pack(side=LEFT,padx=25, pady=25)
  84 + self.modified5=StringVar()
  85 + self.modified_entry5= Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified5,show="*")
  86 +
  87 + self.modified_entry5.grid(row =3, column =1)
  88 +
  89 + self.btnan = Button(self.mainWindow,font=('arial',50,'bold'),bd=4, text="Se connecter", bg="blue", fg="white", command=self.seconnecter)
  90 + self.btnan.pack()
  91 + #self.btntablenew = Button(self.mainWindow, text="initialiser",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.nouveauD)
  92 + #self.btntablenew.pack()
  93 +
  94 + #self.frameButtontable1 = Frame(self.frameSaisie, bg="blue")
  95 + #self.frameButtontable1.pack(side=LEFT)
  96 + #self.btnacceuille = Button(self.frameResult00, text="Acceuil",font=('arial',50,'bold'),bd=4, bg="red", fg="white",command=self.acceuil)
  97 + #self.btnacceuille.grid(row=3,column=2)
  98 +
  99 + self.exit_button = Button(self.mainWindow,font=('arial',50,'bold'),bd=4,bg="red",fg="black", text = "Exit", command = self.destroy)
  100 + self.exit_button.pack()
  101 +
  102 +
  103 + def nouveauD(self):
  104 + #self.dose.set("")
  105 + self.modified5332100.set("")
  106 + self.modified51.set("")
  107 + self.modified4.set("")
  108 + self.modified5.set("")
  109 + def seconnecter(self):
  110 + playlist = {}
  111 + playlist["identifiant"] = {}
  112 + playlist["identifiant"]["user"]=self.modified4.get()
  113 + playlist["identifiant"]["password"]=self.modified5.get()
  114 + playlist["dbinfo"] = {}
  115 + playlist["dbinfo"]["db"]=self.modified51.get()
  116 + playlist["dbinfo"]["host"]=self.modified5332100.get()
  117 + with open('conn1.json', 'w', encoding='utf-8') as f:
  118 + json.dump(playlist, f, indent=4)
  119 + self.destroy()
  120 + #ex.bd.cursor.execute("select nom from groupe order by nom")
  121 + #resultat1=ex.bd.cursor.fetchall()
  122 + #print("bonjour",resultat1)
  123 + #a=pf.recupconf("conn1.json")
  124 + #bd=pf.GestionBD(a[0],a[1],a[2],a[3])
  125 + #print(a)
src/gestionIntervenant.py 0 → 100755
  1 +++ a/src/gestionIntervenant.py
@@ -0,0 +1,472 @@ @@ -0,0 +1,472 @@
  1 +import testPostgres as pf
  2 +import traceback
  3 +import sys
  4 +from tkinter import *
  5 +from tkinter import ttk, messagebox
  6 +import sGDE_IsmerQO as iF
  7 +import seconnecter as ex
  8 +
  9 +#ex.bd.cursor.execute("select nextval('seq_int')")
  10 +#resultat2=ex.bd.cursor.fetchone()
  11 +#print(resultat2)
  12 +def geoliste(g):
  13 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  14 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  15 +def centrefenetre(fen):
  16 + fen.update_idletasks()
  17 + l,h,x,y=geoliste(fen.geometry())
  18 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  19 +
  20 +class IntervenantGraphic(Tk):
  21 +
  22 + def __init__(self):
  23 + Tk.__init__(self)
  24 + #self.minsize(1200,700)
  25 + self.title('Gestion Intervenant')
  26 + self.creerWidgets()
  27 +
  28 + def creerWidgets(self):
  29 + self.mainWindow = Frame(self, bg="blue")
  30 + self.mainWindow.pack(fill=BOTH, expand=1)
  31 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  32 + self.frameSaisie.pack(fill=BOTH)
  33 + #self.frameButtoninter = Frame(self.frameSaisie, bg="blue")
  34 + #self.frameButtoninter.pack(side=LEFT)
  35 + #self.btninter = Button(self.frameButtoninter, text="Nouveau", bg="blue", fg="white")
  36 + #self.btninter.pack(padx=5, pady=5)
  37 + self.frameButtonmission = Frame(self.frameSaisie, bg="blue")
  38 + self.frameButtonmission.pack(side=LEFT)
  39 + self.btnmission = Button(self.frameButtonmission,font=('arial',50,'bold'), text="modifier", bg="blue", fg="white", command=self.modifier)
  40 + self.btnmission.pack(padx=5, pady=5)
  41 + self.frameButtontable = Frame(self.frameSaisie, bg="blue")
  42 + self.frameButtontable.pack(side=LEFT)
  43 + self.btntable = Button(self.frameButtontable,font=('arial',50,'bold'), text="supprimer", bg="blue", fg="white",command=self.supprimer)
  44 + self.btntable.pack(padx=5, pady=5)
  45 +
  46 + self.frameButtonnew = Frame(self.frameSaisie, bg="blue")
  47 + self.frameButtonnew.pack(side=LEFT)
  48 + self.btntablenew = Button(self.frameButtonnew,font=('arial',50,'bold'), text="nouveau", bg="blue", fg="white",command=self.nouveauD)
  49 + self.btntablenew.pack(padx=5, pady=5)
  50 +
  51 + self.frameButtontable1 = Frame(self.frameSaisie, bg="blue")
  52 + self.frameButtontable1.pack(side=LEFT)
  53 + self.btnacceuille = Button(self.frameButtontable1,font=('arial',50,'bold'), text="Acceuil", bg="red", fg="white",command=self.acceuil)
  54 + self.btnacceuille.pack(padx=5, pady=5)
  55 + #self.frameButtonOk = Frame(self.frameSaisie, bg="blue")
  56 + #self.frameButtonOk.pack(side=RIGHT)
  57 + #self.btnOk = Button(self.frameButtonOk, text="ok", bg="blue", fg="white")
  58 + #self.btnOk.pack(padx=5, pady=10)
  59 + #self.frameButtonan = Frame(self.frameSaisie, bg="blue")
  60 + #self.frameButtonan.pack(side=RIGHT)
  61 + #self.btnan = Button(self.frameButtonan, text="annuler", bg="blue", fg="white")
  62 + #self.btnan.pack(padx=5, pady=10)
  63 + self.frameButtonsauve = Frame(self.frameSaisie, bg="blue")
  64 + self.frameButtonsauve.pack(side=RIGHT)
  65 + self.btnsauve = Button(self.frameButtonsauve,font=('arial',50,'bold'), text="sauvegarder", bg="blue", fg="white", command=self.sauvegarder)
  66 + self.btnsauve.pack(padx=5, pady=10)
  67 +
  68 + self.frameLogin = Frame(self.frameSaisie, bg="blue")
  69 + self.frameLogin.pack(side=RIGHT)
  70 + self.login = StringVar()
  71 + self.loginEntry = Entry(self.frameLogin,font=('arial',50,'bold'), textvariable=self.login, width=50)
  72 + self.loginEntry.pack(padx=5, pady=5)
  73 + self.loginEntry.focus()
  74 +
  75 +
  76 + self.frameText = Frame(self.frameSaisie, bg="blue")
  77 + self.frameText.pack(side=RIGHT)
  78 + self.label = Label(self.frameText,font=('arial',50,'bold'), text="Acronyme Intervenant", bg="blue", fg="white")
  79 + self.label.pack(padx=5, pady=5)
  80 +
  81 +
  82 + #self.dose_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  83 + #self.dose_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  84 +
  85 +
  86 + #self.modified_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  87 + #self.modified_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  88 + #self.exit_button.grid(row = 0, column = 3)
  89 + self.frameResult10 = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  90 + self.frameResult10.pack( fill=BOTH)
  91 + self.frameResult = Frame(self.frameResult10, bd=4, relief=SUNKEN)
  92 + self.frameResult.pack(side=LEFT,fill=X)
  93 + self.ent_label = Label(self.frameResult,font=('arial',20,'bold'),bg="blue", fg="white", text="Identification:")
  94 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  95 + self.ent_label.pack(side=TOP,padx=5, pady=5)
  96 + self.frameResult00 = Frame(self.frameResult, bd=4, relief=SUNKEN)
  97 + self.frameResult00.pack(fill=BOTH,padx=15, pady=15)
  98 +
  99 + self.dose_label = Label(self.frameResult00,font=('arial',20,'bold'), text = "No Sequentiel:")
  100 + #self.dose_label.configure(font=('Helvetica', 12))
  101 + #self.dose_label.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  102 + self.dose = StringVar()
  103 + self.dose_entry = Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.dose)
  104 + #self.dose_entry.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  105 + #self.dose_entry.focus()
  106 + self.dose_label.grid(row =0)
  107 + self.dose_entry.grid(row =0,column=1)
  108 +
  109 + self.modified_label = Label(self.frameResult00,font=('arial',20,'bold'), text = "nom:")
  110 + #self.modified_label.configure(font=('Helvetica', 12))
  111 + #self.modified_label.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  112 + self.nom=StringVar()
  113 + self.modified_entry = Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.nom)
  114 + #self.modified_entry.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  115 + #self.modified_entry.focus()
  116 +
  117 + self.modified_label.grid(row =1,column=0)
  118 + self.modified_entry.grid(row =1,column=1)
  119 + self.modified_label1 = Label(self.frameResult00,font=('arial',20,'bold'), text = "courriel:")
  120 + #self.modified_label1.configure(font=('Helvetica', 12))
  121 +
  122 + #self.modified_label1.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  123 + self.modified1=StringVar()
  124 + self.modified_entry1 = Entry(self.frameResult00,font=('arial',50,'bold'),textvariable=self.modified1,width=30)
  125 + #self.modified_entry1.pack(side=LEFT,padx=25, pady=25,anchor=CENTER)
  126 + #self.modified_entry1.focus()
  127 + self.modified_label1.grid(row =2,column=0)
  128 + self.modified_entry1.grid(row =2,column=1)
  129 +
  130 + self.frameResult.rowconfigure(0, weight=1)
  131 + self.frameResult.columnconfigure(0, weight=1)
  132 +
  133 + self.frameResult22 = Frame(self.frameResult10, bd=4, relief=SUNKEN)
  134 + self.frameResult22.pack(side=LEFT,fill=BOTH)
  135 +
  136 +
  137 + self.ent_label = Label(self.frameResult22,font=('arial',20,'bold'),bg="blue", fg="white", text="Description:")
  138 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  139 + self.ent_label.pack(side=TOP,padx=5, pady=5)
  140 +
  141 + self.frameResult2 = Frame(self.frameResult22, bd=2, relief=SUNKEN)
  142 + self.frameResult2.pack( fill=BOTH)
  143 +
  144 + self.modified_label2 = Label(self.frameResult2,font=('arial',20,'bold'), text = "Coordonnees:")
  145 + #self.modified_label2.configure(font=('Helvetica', 12))
  146 +
  147 + #self.modified_label2.pack(side=LEFT,padx=25, pady=25)
  148 + self.modified2=StringVar()
  149 + self.modified_entry2 = Entry(self.frameResult2,font=('arial',50,'bold'),textvariable=self.modified2,width=40)
  150 + #self.modified_entry2.pack(side=LEFT,padx=25, pady=25)
  151 + #self.modified_entry2.focus()
  152 + #self.ent_label.pack(side=TOP,padx=5, pady=5)
  153 + self.modified_label2.grid(row =0,column=0)
  154 + self.modified_entry2.grid(row =0,column=1)
  155 +
  156 +
  157 + self.modified_label3 = Label(self.frameResult2,font=('arial',20,'bold'), text = "Nom employeur:")
  158 + #self.modified_label3.configure(font=('Helvetica', 12))
  159 + #self.modified_label3.pack(side=LEFT,padx=25, pady=25)
  160 + self.modified3=StringVar()
  161 + self.modified_entry3 = Entry(self.frameResult2,font=('arial',50,'bold'),textvariable=self.modified3)
  162 + #self.modified_entry3.pack(side=LEFT,padx=25, pady=25)
  163 + #self.modified_entry3.focus()
  164 + self.modified_label3.grid(row =1,column=0)
  165 + self.modified_entry3.grid(row =1,column=1)
  166 +
  167 + self.modified_label4 = Label(self.frameResult2,font=('arial',20,'bold'), text = "Nombre d'intervenant:")
  168 + #self.modified_label4.configure(font=('Helvetica', 12))
  169 + #self.modified_label4.pack(side=LEFT,padx=25, pady=25)
  170 + self.modified4=StringVar()
  171 + self.modified_entry4 = Entry(self.frameResult2,font=('arial',50,'bold'),textvariable=self.modified4)
  172 + #self.modified_entry4.pack(side=LEFT,padx=25, pady=25)
  173 + #self.modified_entry4.focus()
  174 + #self.tree.grid(in_=self.frameResult, row=0, column=1, sticky=NSEW)
  175 + #ysb.grid(in_=self.frameResult, row=0, column=1, sticky=NS)
  176 + self.modified_label4.grid(row =2,column=0)
  177 + self.modified_entry4.grid(row =2,column=1)
  178 +
  179 + self.frameResult1 = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  180 + self.frameResult1.pack(expand=1, fill=BOTH, padx=15, pady=15)
  181 + self.datacols = ('seq_int','accronyme','name', 'courriel','organisation','coor_int',)
  182 + self.tree = ttk.Treeview(columns=self.datacols, show='headings')
  183 + ysb = ttk.Scrollbar(orient=VERTICAL, command=self.tree.yview)
  184 + self.tree['yscroll'] = ysb.set
  185 +
  186 + self.tree.heading('seq_int', text='seq_int', anchor=CENTER)
  187 + self.tree.heading('accronyme', text='accronyme', anchor=CENTER)
  188 + self.tree.heading('name', text='name', anchor=CENTER)
  189 + self.tree.heading('courriel', text='courriel', anchor=CENTER)
  190 + self.tree.heading('organisation', text='organisation', anchor=CENTER)
  191 + self.tree.heading('coor_int', text='cordonnees', anchor=CENTER)
  192 + self.tree.column('seq_int', anchor=CENTER)
  193 + self.tree.column('accronyme', anchor=CENTER)
  194 + self.tree.column('name', anchor=CENTER)
  195 + self.tree.column('courriel', anchor=CENTER)
  196 + self.tree.column('organisation', anchor=CENTER)
  197 + self.tree.column('coor_int', anchor=CENTER)
  198 +
  199 + self.tree.grid(in_=self.frameResult1, row=0, column=0, sticky=NSEW)
  200 + ysb.grid(in_=self.frameResult1, row=0, column=1, sticky=NS)
  201 + self.frameButtolist = Frame(self.mainWindow, bg="blue")
  202 + self.frameButtolist.pack(side=RIGHT)
  203 + self.btnan = Button(self.frameButtolist,font=('arial',50,'bold'), text="liste intervenant", bg="blue", fg="white", command=self.resultatintervenant)
  204 + self.btnan.pack(padx=5, pady=10)
  205 + self.frameResult1.rowconfigure(0, weight=1)
  206 + self.frameResult1.columnconfigure(0, weight=1)
  207 +
  208 + style = ttk.Style()
  209 + style.configure(".", font=('arial',20,'bold'), foreground="white")
  210 + style.configure("Treeview.Heading", font=('arial',20,'bold'), foreground='blue')
  211 + self.tree.tag_configure('oddrow', background='#06C')
  212 + self.tree.tag_configure('evenrow', background='#066', anchor=CENTER)
  213 +
  214 + self.frameHL = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  215 + self.HL = ('H(X)')
  216 + self.treeHL = ttk.Treeview(columns=self.HL, show='headings', height='0')
  217 + self.exit_button = Button(self.mainWindow,font=('arial',50,'bold'),bg="red",fg="black", text = "Exit", command = self.mainWindow.quit)
  218 + self.exit_button.pack()
  219 + #self.update_layout()
  220 + self.tree.bind('<Double-Button-1>', self.on_configure)
  221 +#choix d un intervenant
  222 + def acceuil(self):
  223 + #prob = self.loginEntry.get().strip().split(' ')
  224 + try:
  225 + self.destroy()
  226 + self.groupe= iF.InterfaceGraphic()
  227 + #self.groupe.mainloop()
  228 + #print("bonjour")
  229 +
  230 + except Exception as err:
  231 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  232 + % (err))
  233 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  234 + def on_configure(self, event):
  235 + w,h = event.x, event.y
  236 + #natural = self.frameResult1.winfo_reqwidth()
  237 + #print(self.tree.identify_element(w,h))
  238 + seltxt = self.tree.set(self.tree.selection(), 'accronyme')
  239 + if ex.bd.echec:
  240 + raise ValueError("Erreur : connection echoue")
  241 + #prob = [float(i) for i in prob if i!='' and i!='0']
  242 + ex.bd.cursor.execute("""select acr_nom_int,nom,courriel,organisation,coor_int,seq_intervenant from intervenant where acr_nom_int= '%s'"""%seltxt)
  243 + resultat=ex.bd.cursor.fetchone()
  244 + self.modified1.set(resultat[2])
  245 + self.modified2.set(resultat[4])
  246 + self.modified3.set(resultat[3])
  247 + self.dose.set(resultat[5])
  248 + self.login.set(resultat[0])
  249 + self.nom.set(resultat[1])
  250 + def nouveauD(self):
  251 + self.modified1.set("")
  252 + self.modified2.set("")
  253 + self.modified3.set("")
  254 + self.dose.set("")
  255 + self.login.set("")
  256 + self.nom.set("")
  257 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  258 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  259 + #inserer un intervenant
  260 + def sauvegarder(self):
  261 + #natural = self.frameResult1.winfo_reqwidth()
  262 + #print(self.tree.identify_element(w,h))
  263 + #sql.append((str(self.nom.get()).encode("utf8"),str(self.modified1.get()).encode("utf8"),str(self.modified3.get()).encode("utf8"),str(self.modified2.get()).encode("utf8")))
  264 +
  265 + if self.nom.get()=="":
  266 + messagebox.showerror("Erreur de requête", "le champs nom intervenant doit contenir une valeur.")
  267 + elif self.modified1.get()=="":
  268 + messagebox.showerror("Erreur de requête", "le champs courriel intervenant doit contenir une valeur.")
  269 + elif self.modified3.get()=="":
  270 + messagebox.showerror("Erreur de requête", "le champs organisation intervenant doit contenir une valeur.")
  271 + elif self.modified2.get()=="":
  272 + messagebox.showerror("Erreur de requête", "le champs Coordonnees intervenant doit contenir une valeur.")
  273 + elif self.login.get()=="":
  274 + messagebox.showerror("Erreur de requête", "le champs acronyme intervenant doit contenir une valeur.")
  275 + else:
  276 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where acr_nom_int= '%s'"""%self.login.get())
  277 + resultat=ex.bd.cursor.fetchone()
  278 + if resultat != None:
  279 + messagebox.showerror("Erreur de requête","Existe deja dans la base de données '%s'"""%self.login.get())
  280 + else:
  281 + #base="""INSERT INTO intervenant (nom,courriel,organisation,coor_int) VALUES (sql)"""
  282 + #namedict = {"acronyme":self.login.get(),"nom":self.nom.get(),"cour":self.modified1.get(),"orga":self.modified3.get(),"coord":self.modified2.get()}
  283 + #print(namedict["orga"])
  284 + base="""INSERT INTO intervenant(acr_nom_int,nom,courriel,organisation,coor_int) VALUES(%s, %s, %s, %s, %s)"""
  285 + #base="INSERT INTO intervenant(seq_int,acr_nom_int,nom,courriel,organisation,coor_int) VALUES(%s,%s, %s, %s, %s, %s)"
  286 + ex.bd.cursor.execute("""select max(seq_int) from intervenant """)
  287 + seq=ex.bd.cursor.fetchone()
  288 + #print(seq)
  289 + try:
  290 + #if ex.bd.echec:
  291 + # raise ValueError("Erreur : connection echoue")
  292 + #prob = [float(i) for i in prob if i!='' and i!='0']
  293 + ex.bd.cursor.execute(base,(self.login.get(),self.nom.get(),self.modified1.get(),self.modified3.get(),self.modified2.get()))
  294 + #resultat=ex.bd.cursor.fetchone()
  295 + #print(base)
  296 + messagebox.showinfo("Information","Insertion reussi avec succes.")
  297 + ex.bd.commit()
  298 + except Exception as err:
  299 +
  300 + # afficher la requête et le message d'erreur système :
  301 +
  302 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  303 +
  304 + % (base, err))
  305 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  306 + ex.bd.rollback()
  307 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  308 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  309 + #modifier un Intervenant
  310 + def modifier(self):
  311 + #natural = self.frameResult1.winfo_reqwidth()
  312 + #print(self.tree.identify_element(w,h))
  313 + #sql.append((str(self.nom.get()).encode("utf8"),str(self.modified1.get()).encode("utf8"),str(self.modified3.get()).encode("utf8"),str(self.modified2.get()).encode("utf8")))
  314 + if self.dose.get()=="":
  315 + messagebox.showerror("Erreur de requête", "le champs seq int doit contenir une valeur.")
  316 + elif self.nom.get()=="":
  317 + messagebox.showerror("Erreur de requête", "le champs nom intervenant doit contenir une valeur.")
  318 + elif self.modified1.get()=="":
  319 + messagebox.showerror("Erreur de requête", "le champs courriel intervenant doit contenir une valeur.")
  320 + elif self.modified2.get()=="":
  321 + messagebox.showerror("Erreur de requête", "le champs Coordonnees intervenant doit contenir une valeur.")
  322 + elif self.login.get()=="":
  323 + messagebox.showerror("Erreur de requête", "le champs acronyme intervenant doit contenir une valeur.")
  324 + else:
  325 + #ex.bd.cursor.execute("""select acr_nom_int from intervenant where acr_nom_int= '%s'"""%self.login.get())
  326 + #resultat=ex.bd.cursor.fetchone()
  327 + #if resultat != None:
  328 + # messagebox.showerror("Erreur de requête","Existe deja dans la base de données '%s'"""%self.login.get())
  329 + #else:
  330 + #base="""INSERT INTO intervenant (nom,courriel,organisation,coor_int) VALUES (sql)"""
  331 + #namedict = {"acronyme":self.login.get(),"nom":self.nom.get(),"cour":self.modified1.get(),"orga":self.modified3.get(),"coord":self.modified2.get()}
  332 + #print(namedict["orga"])
  333 + base="UPDATE intervenant SET acr_nom_int=%s, nom=%s, courriel=%s ,organisation=%s, coor_int=%s where acr_nom_int=%s"
  334 + #base="INSERT INTO intervenant(seq_int,acr_nom_int,nom,courriel,organisation,coor_int) VALUES(%s,%s, %s, %s, %s, %s)"
  335 + ex.bd.cursor.execute("""select max(seq_int) from intervenant """)
  336 + seq=ex.bd.cursor.fetchone()
  337 + #print(seq)
  338 + try:
  339 + #if ex.bd.echec:
  340 + # raise ValueError("Erreur : connection echoue")
  341 + #prob = [float(i) for i in prob if i!='' and i!='0']
  342 + ex.bd.cursor.execute(base,(self.login.get(),self.nom.get(),self.modified1.get(),self.modified3.get(),self.modified2.get(),self.login.get()))
  343 + #resultat=ex.bd.cursor.fetchone()
  344 + #print(base)
  345 + messagebox.showinfo("requete","modification reussi avec succes.")
  346 + ex.bd.commit()
  347 + self.resultatintervenant()
  348 + except Exception as err:
  349 +
  350 + # afficher la requête et le message d'erreur système :
  351 +
  352 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  353 +
  354 + % (base, err))
  355 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  356 + ex.bd.rollback()
  357 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  358 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  359 +
  360 +
  361 + def resultatrequete(self):
  362 + #prob = self.loginEntry.get().strip().split(' ')
  363 + prob = self.loginEntry.get()
  364 + if ex.bd.echec:
  365 + raise ValueError("Erreur : connection echoue")
  366 + try:
  367 + #prob = [float(i) for i in prob if i!='' and i!='0']
  368 + ex.bd.cursor.execute(prob)
  369 + resultat=ex.bd.cursor.fetchall()
  370 + self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  371 + self.tree.delete(END, 'end',tags = ('oddrow',))
  372 + for el in resultat:
  373 + self.tree.insert('', END, values=(el), tags = ('oddrow',))
  374 +
  375 + #self.treeHL.heading('H(X)', text='H(X) = '+str(resultat), anchor=CENTER)
  376 + #self.treeHL.heading('L', text='L = '+str(result[2]), anchor=CENTER)
  377 + #self.treeHL.heading('u', text='Efficacité(µ) = '+str(result[3]), anchor=CENTER)
  378 + self.treeHL.grid(in_=self.frameHL, row=0, column=0, sticky=NSEW)
  379 + self.frameHL.rowconfigure(0, weight=1)
  380 + self.frameHL.columnconfigure(0, weight=1)
  381 + except:
  382 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte. saisie")
  383 + #lister les intervenant
  384 + def resultatintervenant(self):
  385 + #prob = self.loginEntry.get().strip().split(' ')
  386 + a=[]
  387 + self.tree.delete(*self.tree.get_children())
  388 + prob = self.loginEntry.get()
  389 + if ex.bd.echec:
  390 + raise ValueError("Erreur : connection echoue")
  391 + try:
  392 + #prob = [float(i) for i in prob if i!='' and i!='0']
  393 + ex.bd.cursor.execute("select seq_intervenant,acr_nom_int,nom,courriel,organisation,coor_int from intervenant order by acr_nom_int")
  394 + resultat=ex.bd.cursor.fetchall()
  395 + self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  396 + for el in resultat:
  397 + self.tree.insert('', END, values=(el[0],el[1],el[2],el[3],el[4],el[5]), tags = ('oddrow',))
  398 + #self.tree.delete('', END, values=(el[0],el[1],el[2],el[3],el[4],el[5]))
  399 + #selected_item = self.tree.selection()[1] ## get selected item
  400 + #print(selected_item)
  401 + #self.tree.delete(selected_item)
  402 + #self.tree.delete('',END,values=(el[0],el[1],el[2],el[3],el[4],el[5]), tags = ('oddrow',))
  403 + #self.tree.insert('', END, values=(el[0],el[1],el[2],el[3],el[4],el[5]), tags = ('oddrow',))
  404 + a.append(el[0])
  405 + #self.treeHL.heading('H(X)', text='H(X) = '+str(resultat), anchor=CENTER)
  406 + #self.treeHL.heading('L', text='L = '+str(result[2]), anchor=CENTER)
  407 + #self.treeHL.heading('u', text='Efficacité(µ) = '+str(result[3]), anchor=CENTER)
  408 + self.treeHL.grid(in_=self.frameHL, row=0, column=0, sticky=NSEW)
  409 + self.frameHL.rowconfigure(0, weight=1)
  410 + self.frameHL.columnconfigure(0, weight=1)
  411 + ex.bd.cursor.execute("select count(*) from intervenant")
  412 + resultat1=ex.bd.cursor.fetchall()
  413 + self.modified4.set(resultat1)
  414 + except:
  415 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte babacar.")
  416 + def supprimer(self):
  417 + #prob = self.loginEntry.get().strip().split(' ')
  418 + prob = self.loginEntry.get()
  419 + if ex.bd.echec:
  420 + raise ValueError("Erreur : connection echoue")
  421 + try:
  422 + #prob = [float(i) for i in prob if i!='' and i!='0']
  423 + tables={"POLYGONE":"acr_nom_int","SERIE":"acr_nom_int_chargement","JEU_DONNEES":"acr_nom_int_insc","proj_prog":"acr_nom_int","mission_exp":"acr_nom_int"}
  424 + for i,j in tables.items():
  425 +
  426 + ex.bd.cursor.execute("SELECT count(*) from "+i+" where "+j+"='"+(self.login.get())+"' ")
  427 + seq=ex.bd.cursor.fetchone()
  428 + if seq[0] > 0 :
  429 + messagebox.showerror("requete","L intervenant "+(self.login.get())+" ne peut pas etre supprimé car il apparait deja dans la table "+i+".")
  430 + return
  431 + table={"intervenant_groupe":"seq_intervenant"}
  432 + for i,j in table.items():
  433 + ex.bd.cursor.execute("SELECT count(*) from "+i+" where "+j+"='"+(self.dose.get())+"' ")
  434 + seq=ex.bd.cursor.fetchone()
  435 + if seq[0] > 0 :
  436 + messagebox.showerror("requete","L intervenant "+(self.login.get())+" ne peut pas etre supprimé car il apparait deja dans la table "+i+".")
  437 + return
  438 +
  439 + ex.bd.cursor.execute("DELETE from intervenant where acr_nom_int='"+(self.login.get())+"' ")
  440 + messagebox.showinfo("requete", "suppression faite avec succes.")
  441 + ex.bd.commit()
  442 + except Exception as err:
  443 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  444 + % (err))
  445 + messagebox.showerror("Erreur de requete", "ces donnees ont associes a d'autres tables.")
  446 + return
  447 + ex.bd.rollback()
  448 + def resultattable(self):
  449 + #prob = self.loginEntry.get().strip().split(' ')
  450 + prob = self.loginEntry.get()
  451 + if ex.bd.echec:
  452 + raise ValueError("Erreur : connection echoue")
  453 + try:
  454 + #prob = [float(i) for i in prob if i!='' and i!='0']
  455 + ex.bd.cursor.execute("select tablename from pg_tables where schemaname='sgde'")
  456 + resultat=ex.bd.cursor.fetchall()
  457 + self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  458 + for el in resultat:
  459 + self.tree.insert('', END, values=(el), tags = ('oddrow',))
  460 +
  461 + #self.treeHL.heading('H(X)', text='H(X) = '+str(resultat), anchor=CENTER)
  462 + #self.treeHL.heading('L', text='L = '+str(result[2]), anchor=CENTER)
  463 + #self.treeHL.heading('u', text='Efficacité(µ) = '+str(result[3]), anchor=CENTER)
  464 + self.treeHL.grid(in_=self.frameHL, row=0, column=0, sticky=NSEW)
  465 + self.frameHL.rowconfigure(0, weight=1)
  466 + self.frameHL.columnconfigure(0, weight=1)
  467 + except:
  468 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  469 +if __name__ == '__main__':
  470 + huff = IntervenantGraphic()
  471 + centrefenetre(huff)
  472 + huff.mainloop()
src/gestiongroupe.py 0 → 100755
  1 +++ a/src/gestiongroupe.py
@@ -0,0 +1,652 @@ @@ -0,0 +1,652 @@
  1 +from googletrans import Translator
  2 +import testPostgres as pf
  3 +import traceback
  4 +import sys
  5 +from tkinter import *
  6 +from tkinter import ttk, messagebox
  7 +import pandas as pd
  8 +import sGDE_IsmerQO as iF
  9 +import seconnecter as ex
  10 +#ex.bd.cursor.execute("select nextval('seq_int')")
  11 +#resultat2=ex.bd.cursor.fetchone()
  12 +#print(resultat2)
  13 +def geoliste(g):
  14 + r=[i for i in range(0,len(g)) if not g[i].isdigit()]
  15 + return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
  16 +def centrefenetre(fen):
  17 + fen.update_idletasks()
  18 + l,h,x,y=geoliste(fen.geometry())
  19 + fen.geometry("%dx%d%+d%+d" % (l,h,(fen.winfo_screenwidth()-l)//2,(fen.winfo_screenheight()-h)//2))
  20 +
  21 +"""gestion de groupe """
  22 +class GroupeGraphic(Tk):
  23 +
  24 + def __init__(self):
  25 + Tk.__init__(self)
  26 + #self.minsize(1200,700)
  27 + self.title('Gestion Groupe')
  28 + self.creerWidgets()
  29 +##interface pour la mission
  30 + def creerWidgets(self):
  31 + self.mainWindow = Frame(self, bg="blue")
  32 + self.mainWindow.pack(fill=BOTH, expand=1)
  33 + #self.tete = Frame(self.mainWindow, bg="blue")
  34 + #self.tete.pack(side=TOP, fill=BOTH)
  35 + #self.label = Label(self.tete,font=('arial',50,'bold'),text="Gestion des groupes", bg="blue", fg="white")
  36 + #self.label.pack(padx=5, pady=5)
  37 + self.frameSaisie = Frame(self.mainWindow, bg="blue")
  38 + self.frameSaisie.pack(fill=BOTH)
  39 + #self.frameButtoninter = Frame(self.frameSaisie, bg="blue")
  40 + #self.frameButtoninter.pack(side=LEFT)
  41 + #self.btninter = Button(self.frameButtoninter, text="Nouveau", bg="blue", fg="white")
  42 + #self.btninter.pack(padx=5, pady=5)
  43 + self.frameButtonmission = Frame(self.frameSaisie, bg="blue")
  44 + self.frameButtonmission.pack(side=LEFT)
  45 + self.btnmission = Button(self.frameButtonmission,font=('arial',50,'bold'),bd=4, text="modifier", bg="blue", fg="white", command=self.modifier)
  46 + self.btnmission.pack(padx=5, pady=5)
  47 + self.frameButtontable = Frame(self.frameSaisie, bg="blue")
  48 + self.frameButtontable.pack(side=LEFT)
  49 + self.btntable = Button(self.frameButtontable, text="supprimer",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.supprimer)
  50 + self.btntable.pack(padx=5, pady=5)
  51 +
  52 + self.frameButtonnew = Frame(self.frameSaisie, bg="blue")
  53 + self.frameButtonnew.pack(side=LEFT)
  54 + self.btntablenew = Button(self.frameButtonnew, text="nouveau",font=('arial',50,'bold'),bd=4, bg="blue", fg="white",command=self.nouveauD)
  55 + self.btntablenew.pack(padx=5, pady=5)
  56 +
  57 + self.frameButtontable1 = Frame(self.frameSaisie, bg="blue")
  58 + self.frameButtontable1.pack(side=LEFT)
  59 + self.btnacceuille = Button(self.frameButtontable1, text="Acceuil",font=('arial',50,'bold'),bd=4, bg="red", fg="white",command=self.acceuil)
  60 + self.btnacceuille.pack(padx=5, pady=5)
  61 + #self.frameButtonOk = Frame(self.frameSaisie, bg="blue")
  62 + #self.frameButtonOk.pack(side=RIGHT)
  63 + #self.btnOk = Button(self.frameButtonOk, text="ok", bg="blue", fg="white")
  64 + #self.btnOk.pack(padx=5, pady=10)
  65 + #self.frameButtonan = Frame(self.frameSaisie, bg="blue")
  66 + #self.frameButtonan.pack(side=RIGHT)
  67 + #self.btnan = Button(self.frameButtonan, text="annuler", bg="blue", fg="white")
  68 + #self.btnan.pack(padx=5, pady=10)
  69 + self.frameButtonsauve = Frame(self.frameSaisie, bg="blue")
  70 + self.frameButtonsauve.pack(side=RIGHT)
  71 + self.btnsauve = Button(self.frameButtonsauve, text="sauvegarder", font=('arial',50,'bold'),bd=4,bg="blue", fg="white", command=self.sauvegarder)
  72 + self.btnsauve.pack(padx=5, pady=10)
  73 +
  74 + self.frameLogin = Frame(self.frameSaisie, bg="blue")
  75 + self.frameLogin.pack(side=RIGHT)
  76 + self.login = StringVar()
  77 + self.loginEntry = Entry(self.frameLogin,font=('arial',50,'bold'),bd=4, textvariable=self.login, width=50)
  78 + self.loginEntry.pack(padx=5, pady=5)
  79 + self.loginEntry.focus()
  80 +
  81 +
  82 + self.frameText = Frame(self.frameSaisie, bg="blue")
  83 + self.frameText.pack(side=RIGHT)
  84 + self.label = Label(self.frameText,font=('arial',50,'bold'),bd=4, text="Acronyme de groupe", bg="blue", fg="white")
  85 + self.label.pack(padx=5, pady=5)
  86 +
  87 +
  88 + #self.dose_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  89 + #self.dose_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  90 +
  91 +
  92 + #self.modified_label.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  93 + #self.modified_entry.grid(in_=self.frameSaisie, row=0, column=1, sticky=NS)
  94 + #self.exit_button.grid(row = 0, column = 3)
  95 + self.frameResult = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  96 + self.frameResult.pack( fill=BOTH)
  97 + #self.ent_label = Label(self.frameResult, text="Identification:")
  98 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  99 + #self.ent_label.pack(side=TOP,padx=5, pady=5)
  100 + self.dose_label = Label(self.frameResult,font=('arial',50,'bold'),bd=4, text = "No Sequentiel:")
  101 + #self.dose_label.configure(font=('Helvetica', 12))
  102 + self.dose_label.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  103 + self.dose = StringVar()
  104 + self.dose_entry = Entry(self.frameResult,font=('arial',50,'bold'),bd=4,textvariable=self.dose,width=10)
  105 + self.dose_entry.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  106 + self.dose_entry.focus()
  107 +
  108 + self.modified_label = Label(self.frameResult,font=('arial',50,'bold'),bd=4, text = "Description fr:")
  109 + #self.modified_label.configure(font=('Helvetica', 12))
  110 + self.modified_label.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  111 + self.nom=StringVar()
  112 + self.modified_entry = Entry(self.frameResult,font=('arial',50,'bold'),bd=4,textvariable=self.nom,width=30)
  113 + self.modified_entry.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  114 + self.modified_entry.focus()
  115 +
  116 + self.modified_label1 = Label(self.frameResult,font=('arial',50,'bold'),bd=4, text = "Description En:")
  117 + #self.modified_label1.configure(font=('Helvetica', 12))
  118 +
  119 + self.modified_label1.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  120 + self.modified1=StringVar()
  121 + self.modified_entry1 = Entry(self.frameResult,font=('arial',50,'bold'),bd=4,textvariable=self.modified1,width=30)
  122 + self.modified_entry1.pack(side=LEFT,padx=5, pady=5,anchor=CENTER)
  123 + self.modified_entry1.focus()
  124 +
  125 +
  126 + self.frameButtolist = Frame(self.mainWindow, bg="blue")
  127 + self.frameButtolist.pack(side=RIGHT)
  128 + self.btnan = Button(self.frameButtolist,font=('arial',50,'bold'),bd=4, text="liste groupe", bg="blue", fg="white", command=self.resultatgroupe)
  129 + self.btnan.pack(padx=5, pady=5)
  130 + #self.modified_entry5 = Entry(self.frameResult3,textvariable=self.modified5,width=40)
  131 + #self.modified_entry5.pack(side=LEFT,padx=25, pady=25)
  132 + #self.modified_entry5.focus()
  133 + #self.fruitSelect=StringVar()
  134 + #self.stockFruits=("Pomme","banane","raisin")
  135 + #self.listeFruits=Combobox(self.frameResult3)
  136 +
  137 + # Placement des widgets
  138 + #self.listeFruits.pack()
  139 + #self.liste = Listbox(self.frameResult3)
  140 +
  141 +
  142 +
  143 +
  144 + #self.tree.grid(in_=self.frameResult, row=0, column=1, sticky=NSEW)
  145 + #ysb.grid(in_=self.frameResult, row=0, column=1, sticky=NS)
  146 +
  147 +
  148 + self.frameResult1 = Frame(self.mainWindow, bd=5, relief=SUNKEN)
  149 + self.frameResult1.pack(expand=1, fill=BOTH, padx=5, pady=5)
  150 + self.datacols = ('seq_groupe','nom','desc_fr','desc_en')
  151 + self.tree = ttk.Treeview(columns=self.datacols, show='headings')
  152 + ysb = ttk.Scrollbar(orient=VERTICAL, command=self.tree.yview)
  153 + self.tree['yscroll'] = ysb.set
  154 +
  155 + self.tree.heading('seq_groupe', text='seq_groupe', anchor=CENTER)
  156 + self.tree.heading('nom', text='nom', anchor=CENTER)
  157 + self.tree.heading('desc_fr', text='desc_fr', anchor=CENTER)
  158 + self.tree.heading('desc_en', text='desc_en', anchor=CENTER)
  159 +
  160 + self.tree.column('seq_groupe', anchor=CENTER)
  161 + self.tree.column('nom', anchor=CENTER)
  162 + self.tree.column('desc_fr', anchor=CENTER)
  163 + self.tree.column('desc_en', anchor=CENTER)
  164 +
  165 + self.tree.grid(in_=self.frameResult1, row=0, column=0, sticky=NSEW)
  166 + ysb.grid(in_=self.frameResult1, row=0, column=1, sticky=NS)
  167 + self.frameResult3 = Frame(self.mainWindow, bd=5, relief=SUNKEN)
  168 + self.frameResult3.pack(expand=1, fill=BOTH, padx=5, pady=5)
  169 +
  170 + self.membre = Label(self.frameResult3,font=('arial',15,'bold'),bd=4, text = "Gestion Membre")
  171 + #self.membre.configure(font=('Helvetica', 12))
  172 + self.membre.pack(side=TOP,padx=25, pady=25,anchor=CENTER)
  173 +
  174 + #self.frameResult6 = Frame(self.frameResult3, bd=5, relief=SUNKEN)
  175 + #self.frameResult6.pack(side=LEFT,expand=1, padx=5, pady=5)
  176 + #self.btnprojet1 = Button(self.frameResult6, text="modifier", command=self.ajouterintervenantgroupe)
  177 + #self.frameButtontable1 = Frame(self.frameResult6)
  178 + #self.btntable1 = Button(self.frameButtontable1, text="sauvegarder", command=self.ajouterintervenantgroupe)
  179 + #self.btnprojet1.pack(padx=5, pady=5)
  180 + #self.frameButtontable1.pack(side=LEFT)
  181 + #self.btntable1.pack(padx=5, pady=5)
  182 +
  183 + self.frameResult2 = Frame(self.frameResult3, bd=5, relief=SUNKEN)
  184 + self.frameResult2.pack(side=LEFT ,expand=1, padx=5, pady=5)
  185 + self.datacols1 = ('Membres')
  186 + self.treeMembre = ttk.Treeview(columns=self.datacols1, show='headings')
  187 + ysb1 = ttk.Scrollbar(orient=VERTICAL, command=self.treeMembre.yview)
  188 + self.momMembre=StringVar()
  189 + self.treeMembre['yscroll'] = ysb1.set
  190 + self.treeMembre.heading('Membres', text=' intervenant Membres', anchor=CENTER)
  191 + self.treeMembre.column('Membres', anchor=CENTER)
  192 + self.treeMembre.grid(in_=self.frameResult2, row=0, column=0, sticky=NSEW)
  193 + ysb1.grid(in_=self.frameResult2, row=0, column=1, sticky=NS)
  194 +
  195 + self.frameResult5 = Frame(self.frameResult3, bd=5, relief=SUNKEN, bg="blue")
  196 + self.frameResult5.pack(side=LEFT,expand=1, padx=15, pady=15)
  197 + self.btnprojet = Button(self.frameResult5,font=('arial',50,'bold'),bd=4, text="ajouter",bg="blue", fg="white", command=self.ajouterintervenantgroupe)
  198 + self.frameButtontable = Frame(self.frameResult5,bg="blue")
  199 + self.btntable = Button(self.frameButtontable,font=('arial',50,'bold'),bd=4, text="enlever",bg="blue", fg="white", command=self.enleverintervenantgroupe)
  200 + self.btnprojet.pack(padx=5, pady=5)
  201 + self.frameButtontable.pack(side=LEFT)
  202 + self.btntable.pack(padx=5, pady=5)
  203 +
  204 +
  205 +
  206 + self.frameResult4 = Frame(self.frameResult3, bd=5, relief=SUNKEN)
  207 + self.frameResult4.pack(side=LEFT ,expand=1, padx=5, pady=5)
  208 + self.momnonMembre=StringVar()
  209 + self.datacols2 = ('Non_Membres')
  210 + self.treeNonMembre = ttk.Treeview(columns=self.datacols2, show='headings')
  211 + ysb2 = ttk.Scrollbar(orient=VERTICAL, command=self.treeNonMembre.yview)
  212 + self.treeNonMembre['yscroll'] = ysb2.set
  213 + self.treeNonMembre.heading('Non_Membres', text='intervenant non Membres', anchor=CENTER)
  214 + self.treeNonMembre.column('Non_Membres', anchor=CENTER)
  215 + self.treeNonMembre.grid(in_=self.frameResult4, row=0, column=0, sticky=NSEW)
  216 + ysb2.grid(in_=self.frameResult4, row=0, column=1, sticky=NS)
  217 +
  218 + self.frameResult1.rowconfigure(0, weight=1)
  219 + self.frameResult1.columnconfigure(0, weight=1)
  220 + style = ttk.Style()
  221 + style.configure(".", font=('arial',15,'bold'),bd=4, foreground="white")
  222 + style.configure("Treeview.Heading", font=('arial', 5,'bold'), foreground='blue')
  223 + self.tree.tag_configure('oddrow', background='#06C')
  224 + self.tree.tag_configure('evenrow', background='#066', anchor=CENTER)
  225 +
  226 + #self.frameHL = Frame(self.mainWindow, bd=4, relief=SUNKEN)
  227 + #self.HL = ('H(X)')
  228 + #self.treeHL = ttk.Treeview(columns=self.HL, show='headings', height='0')
  229 +
  230 + #self.frameResult2 = Frame(self.mainWindow, bd=5, relief=SUNKEN)
  231 + #self.frameResult2.pack(expand=1, fill=BOTH, padx=5, pady=5)
  232 + #self.ent_label = Label(self.frameResult1, text="Gestion des membre")
  233 + #self.ent_label.configure(font=('Helvetica', 12),bg="blue", fg="white")
  234 + #self.ent_label.pack(side=TOP,padx=5, pady=5)
  235 +
  236 +
  237 +
  238 + #self.frameButtolist1 = Frame(self.mainWindow, bg="blue")
  239 + #self.frameButtolist1.pack(side=RIGHT)
  240 +
  241 + #self.btnan = Button(self.frameButtolist, text="liste groupe", bg="blue", fg="white", command=self.resultatgroupe)
  242 + #self.btnan.pack(padx=5, pady=10)
  243 +
  244 +
  245 + style1 = ttk.Style()
  246 + style1.configure(".", font=('arial',15,'bold'),bd=4, foreground="white")
  247 + style1.configure("Treeview.Heading", font=('arial', 5,'bold'), foreground='blue')
  248 + self.treeMembre.tag_configure('oddrow', background='#06C')
  249 + self.treeMembre.tag_configure('evenrow', background='#066', anchor=CENTER)
  250 +
  251 + style2 = ttk.Style()
  252 + style2.configure(".", font=('arial',15,'bold'),bd=4, foreground="white")
  253 + style2.configure("Treeview.Heading", font=('arial', 5,'bold'), foreground='blue')
  254 + self.treeNonMembre.tag_configure('oddrow', background='#06C')
  255 + self.treeNonMembre.tag_configure('evenrow', background='#066', anchor=CENTER)
  256 +
  257 +
  258 + self.exit_button = Button(self.mainWindow,font=('arial',15,'bold'),bd=4,bg="red",fg="black", text = "Exit", command = self.mainWindow.quit)
  259 + self.exit_button.pack()
  260 +
  261 +
  262 + #self.update_layout()
  263 + self.tree.bind('<Double-Button-1>', self.on_configure)
  264 + self.treeMembre.bind('<Double-Button-1>', self.onmembre)
  265 + self.treeNonMembre.bind('<Double-Button-1>', self.onnonmembre)
  266 + def acceuil(self):
  267 + #prob = self.loginEntry.get().strip().split(' ')
  268 + try:
  269 + self.destroy()
  270 + self.groupe= iF.InterfaceGraphic()
  271 + #self.groupe.mainloop()
  272 + #print("bonjour")
  273 +
  274 + except Exception as err:
  275 + print("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  276 + % (err))
  277 + messagebox.showerror("Erreur de saisie", "impossible de lancer cette interface.")
  278 + def nouveauD(self):
  279 + self.modified1.set("")
  280 + #self.modified11.set(resultat[5])
  281 + #self.modified2.set(resultat[6])
  282 + #self.modified3.set(resultat[7])
  283 + #self.modified5.set(resultat[2])
  284 + #self.modified4.set(resultat[8])
  285 + #self.v.set(resultat[9])
  286 + self.dose.set("")
  287 + self.login.set("")
  288 + self.nom.set("")
  289 +
  290 + def selectionner(self):
  291 + return str(self.v.get())
  292 + #double clique de bouton sur Scrollbar
  293 + def onmembre(self, event):
  294 + w,h = event.x, event.y
  295 + #natural = self.frameResult1.winfo_reqwidth()
  296 + #print(self.tree.identify_element(w,h))
  297 + seltxt = self.treeMembre.set(self.treeMembre.selection(), 'Membres')
  298 + self.momMembre.set(seltxt)
  299 + def onnonmembre(self, event):
  300 + w,h = event.x, event.y
  301 + #natural = self.frameResult1.winfo_reqwidth()
  302 + #print(self.tree.identify_element(w,h))
  303 + seltxt = self.treeNonMembre.set(self.treeNonMembre.selection(), 'Non_Membres')
  304 + self.momnonMembre.set(seltxt)
  305 + #ex.bd.cursor.execute("""select acr_prj from pp_gen_me where acr_miss= '%s'"""%seltxt)
  306 + #resultat1=ex.bd.cursor.fetchone()
  307 + #self.modified444.set(resultat1)
  308 + #ajout de projet dans l espace
  309 + def on_configure(self, event):
  310 + w,h = event.x, event.y
  311 + #natural = self.frameResult1.winfo_reqwidth()
  312 + #print(self.tree.identify_element(w,h))
  313 + seltxt = self.tree.set(self.tree.selection(), 'nom')
  314 + if ex.bd.echec:
  315 + raise ValueError("Erreur : connection echoue")
  316 + #prob = [float(i) for i in prob if i!='' and i!='0']
  317 + ex.bd.cursor.execute("""select SEQ_GROUPE,NOM,DESC_FR,DESC_EN from GROUPE where nom= '%s'"""%seltxt)
  318 + resultat=ex.bd.cursor.fetchone()
  319 + self.modified1.set(resultat[3])
  320 + #self.modified11.set(resultat[5])
  321 + #self.modified2.set(resultat[6])
  322 + #self.modified3.set(resultat[7])
  323 + #self.modified5.set(resultat[2])
  324 + #self.modified4.set(resultat[8])
  325 + #self.v.set(resultat[9])
  326 + self.dose.set(resultat[0])
  327 + self.login.set(resultat[1])
  328 + self.nom.set(resultat[2])
  329 +
  330 + a=[]
  331 + self.treeMembre.delete(*self.treeMembre.get_children())
  332 + self.treeNonMembre.delete(*self.treeNonMembre.get_children())
  333 + prob = self.loginEntry.get()
  334 + if ex.bd.echec:
  335 + raise ValueError("Erreur : connection echoue")
  336 + try:
  337 + #prob = [float(i) for i in prob if i!='' and i!='0']
  338 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%seltxt)
  339 + resultat=ex.bd.cursor.fetchall()
  340 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant not in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%seltxt)
  341 + resultat1=ex.bd.cursor.fetchall()
  342 +
  343 + #self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  344 + for el in resultat:
  345 + #self.tree.delete(el[0], END)
  346 + self.treeMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  347 + for el in resultat1:
  348 + #self.tree.delete(el[0], END)
  349 + self.treeNonMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  350 +
  351 + except Exception as err:
  352 +
  353 + # afficher la requête et le message d'erreur système :
  354 +
  355 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  356 +
  357 + % ( err))
  358 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  359 + ex.bd.rollback()
  360 +
  361 + #ex.bd.cursor.execute("""select acr_prj from pp_gen_me where acr_miss= '%s'"""%seltxt)
  362 + #resultat1=ex.bd.cursor.fetchone()
  363 + #self.modified444.set(resultat1)
  364 + #ajout de projet dans l espace
  365 + def ajoutnew(self, event):
  366 + w,h = event.x, event.y
  367 + #natural = self.frameResult1.winfo_reqwidth()
  368 + #print(self.tree.identify_element(w,h))
  369 + seltxt =self.modified_entry44.get(self.modified_entry44.curselection())
  370 + if ex.bd.echec:
  371 + raise ValueError("Erreur : connection echoue")
  372 + #prob = [float(i) for i in prob if i!='' and i!='0']
  373 + ex.bd.cursor.execute("""select acr_prj from proj_prog where acr_prj= '%s'"""%seltxt)
  374 + resultat=ex.bd.cursor.fetchone()
  375 + self.modified444.set(resultat[0])
  376 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  377 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  378 + #sauvegarder une nouvelle mission
  379 + def sauvegarder(self):
  380 + translator = Translator()
  381 + if self.login.get()=="":
  382 + messagebox.showerror("Erreur de requête", "le champs acronyme groupe doit contenir une valeur.")
  383 + return
  384 + else:
  385 + ex.bd.cursor.execute("""select nom from groupe where nom= '%s'"""%self.login.get())
  386 + resultat=ex.bd.cursor.fetchone()
  387 + if resultat != None:
  388 + messagebox.showerror("Erreur de requête","Existe deja dans la base de données '%s'"""%self.login.get())
  389 + return
  390 + else:
  391 + #base="""INSERT INTO mission_exp (nom,courriel,organisation,coor_int) VALUES (sql)"""
  392 + #namedict = {"acronyme":self.login.get(),"nom":self.nom.get(),"cour":self.modified1.get(),"orga":self.modified3.get(),"coord":self.modified2.get()}
  393 + #print(namedict["orga"])
  394 + base="""INSERT INTO groupe(nom,desc_fr,desc_en) VALUES(%s, %s, %s)"""
  395 + desc=translator.translate(self.nom.get(), dest='en')
  396 + sql=(self.login.get(),self.dose.get(),self.modified1.get())
  397 + try:
  398 + ex.bd.cursor.execute(base,(self.login.get(),self.nom.get(),desc.text))
  399 + messagebox.showinfo("Information","Insertion d'un nouveau groupe.")
  400 + #ex.bd.commit()
  401 + except Exception as err:
  402 +
  403 + # afficher la requête et le message d'erreur système :
  404 +
  405 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  406 +
  407 + % (base, err))
  408 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  409 + ex.bd.rollback()
  410 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  411 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  412 + #modier une mission
  413 + def modifier(self):
  414 + #natural = self.frameResult1.winfo_reqwidth()
  415 + #print(self.tree.identify_element(w,h))
  416 + #sql.append((str(self.nom.get()).encode("utf8"),str(self.modified1.get()).encode("utf8"),str(self.modified3.get()).encode("utf8"),str(self.modified2.get()).encode("utf8")))
  417 + translator = Translator()
  418 +
  419 + if self.login.get()=="":
  420 + messagebox.showerror("Erreur de requête", "le champs acronyme groupe doit contenir une valeur.")
  421 + return
  422 + else:
  423 +
  424 + base="UPDATE groupe SET nom=%s, desc_fr=%s, desc_en=%s where nom=%s"
  425 + try:
  426 + #if ex.bd.echec:
  427 + # raise ValueError("Erreur : connection echoue")
  428 + #prob = [float(i) for i in prob if i!='' and i!='0']
  429 + desc=translator.translate(self.nom.get(), dest='en')
  430 + ex.bd.cursor.execute(base,(self.login.get(),self.nom.get(),desc.text,self.login.get()))
  431 + #resultat=ex.bd.cursor.fetchone()
  432 + #print(base)
  433 + messagebox.showinfo("requete","modification du groupe fait avec succes.")
  434 + ex.bd.commit()
  435 + except Exception as err:
  436 +
  437 + # afficher la requête et le message d'erreur système :
  438 +
  439 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  440 +
  441 + % (base, err))
  442 + messagebox.showerror("Erreur de saisie", "La requête n est pas correcte.")
  443 + ex.bd.rollback()
  444 + #self.tree.itemconfigure('inner', width= w if w>natural else natural)
  445 + #self.tree.configure(scrollregion=self.tree.bbox('.'))
  446 +#nouvequ projet dans la base
  447 + def enleverintervenantgroupe(self):
  448 + self.treeNonMembre.delete(*self.treeNonMembre.get_children())
  449 + self.treeMembre.delete(*self.treeMembre.get_children())
  450 + base="delete from intervenant_groupe where (seq_intervenant,seq_groupe) in (select i.seq_intervenant, g.seq_groupe from intervenant i, groupe g where i.acr_nom_int =%s and g.nom=%s)"
  451 + try:
  452 +
  453 + #desc=translator.translate(self.nom.get(), dest='en')
  454 + ex.bd.cursor.execute(base,(self.momMembre.get(),self.login.get()))
  455 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%self.login.get())
  456 + resultat=ex.bd.cursor.fetchall()
  457 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant not in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%self.login.get())
  458 + resultat1=ex.bd.cursor.fetchall()
  459 +
  460 + #self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  461 + for el in resultat:
  462 + #self.tree.delete(el[0], END)
  463 + self.treeMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  464 + for el in resultat1:
  465 + #self.tree.delete(el[0], END)
  466 + self.treeNonMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  467 + #resultat=ex.bd.cursor.fetchone()
  468 + #print(base)
  469 + messagebox.showinfo("requete","suppression intervenant dans le groupe fait avec succes.")
  470 + ex.bd.commit()
  471 + except Exception as err:
  472 +
  473 + # afficher la requête et le message d'erreur système :
  474 +
  475 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  476 +
  477 + % (base, err))
  478 + messagebox.showerror("Erreur de saisie", "Selectionner un intervenant.")
  479 + ex.bd.rollback()
  480 +
  481 + def ajouterintervenantgroupe(self):
  482 + self.treeNonMembre.delete(*self.treeNonMembre.get_children())
  483 + self.treeMembre.delete(*self.treeMembre.get_children())
  484 + base="insert into intervenant_groupe (seq_intervenant,seq_groupe) select i.seq_intervenant, g.seq_groupe from intervenant i, groupe g where i.acr_nom_int =%s and g.nom=%s"
  485 + try:
  486 + #desc=translator.translate(self.nom.get(), dest='en')
  487 + ex.bd.cursor.execute(base,(self.momnonMembre.get(),self.login.get()))
  488 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%self.login.get())
  489 + resultat=ex.bd.cursor.fetchall()
  490 + ex.bd.cursor.execute("""select acr_nom_int from intervenant where seq_intervenant not in (select seq_intervenant from intervenant_groupe where seq_groupe = (select seq_groupe from groupe where nom='%s'))"""%self.login.get())
  491 + resultat1=ex.bd.cursor.fetchall()
  492 +
  493 + #self.frameHL.pack(fill=BOTH, padx=15, pady=5)
  494 + for el in resultat:
  495 + #self.tree.delete(el[0], END)
  496 + self.treeMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  497 + for el in resultat1:
  498 + #self.tree.delete(el[0], END)
  499 + self.treeNonMembre.insert('', END, values=(el[0]), tags = ('oddrow',))
  500 + #resultat=ex.bd.cursor.fetchone()
  501 + #print(base)
  502 + messagebox.showinfo("requete","ajout d'un Nouveau intervenant dans le groupe fait avec succes.")
  503 + ex.bd.commit()
  504 + except Exception as err:
  505 + # afficher la requête et le message d'erreur système :
  506 +
  507 + print ("Requête SQL incorrecte :\n%s\nErreur détectée :\n%s"\
  508 +
  509 + % (base, err))
  510 + messagebox.showerror("Erreur de saisie", "Selectionner un intervenant.")
  511 + ex.bd.rollback()
  512 +
  513 + def supprimer(self):