Skip to content
Snippets Groups Projects
Commit 4544f2cf authored by Bouchaira Neirouz's avatar Bouchaira Neirouz
Browse files

application shiny

parent 0bc5217b
No related branches found
No related tags found
No related merge requests found
......@@ -6,21 +6,27 @@ import pandas as pd
from datetime import datetime
# Connect to the database
conn = sqlite3.connect('C:/Users/neiro/Documents/GitHub/sgbd-usine/donnees/company.db')
cursor = conn.cursor()
cursor.execute("SELECT * FROM EMPLOYE")
data = pd.DataFrame(cursor.fetchall(), columns=[x[0] for x in cursor.description])
ui.page_opts(title="Bienvenue à la page RH", fillable=True)
with ui.nav_panel("Création de compte employé"):
conn = sqlite3.connect('C:/Users/neiro/Documents/GitHub/sgbd-usine/donnees/company.db')
cursor = conn.cursor()
with ui.card():
ui.h2("Création de compte employé")
# Set the employee number to the next available number
# Employee name
conn = sqlite3.connect('C:/Users/neiro/Documents/GitHub/sgbd-usine/donnees/company.db')
cursor = conn.cursor()
res= cursor.execute("SELECT MAX(NUMERO_EMPLOYE) FROM EMPLOYE")
ui.input_text("Nom", "NOM")
conn.commit()
conn.close()
with ui.nav_panel("Suivi des employés"):
@render.data_frame
def suivi():
conn1 = sqlite3.connect('C:/Users/neiro/Documents/GitHub/sgbd-usine/donnees/company.db')
cursor = conn1.cursor()
res= cursor.execute("SELECT * FROM EMPLOYE")
data = pd.DataFrame(res.fetchall(), columns=[x[0] for x in cursor.description])
return data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment