Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Database Management System Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bouchaira Neirouz
Database Management System Project
Commits
4f131eb2
Commit
4f131eb2
authored
7 months ago
by
Bouchaira Neirouz
Browse files
Options
Downloads
Patches
Plain Diff
ggg
parent
ec28fd6d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
code_interface/streamlit_app.py
+20
-20
20 additions, 20 deletions
code_interface/streamlit_app.py
with
20 additions
and
20 deletions
code_interface/streamlit_app.py
+
20
−
20
View file @
4f131eb2
...
...
@@ -14,7 +14,7 @@ with tab1:
# Add code for "Suivi Employés" page here
st
.
write
(
"
Page de suivi des employés
"
)
# Connect to the database
with
sqlite3
.
connect
(
r
'
donnees\company.db
'
)
as
conn
:
# Use raw string
with
sqlite3
.
connect
(
r
'
C:\Users\neiro\Documents\+\GitHub\sgbd-usine\
donnees\company.db
'
)
as
conn
:
# Use raw string
cursor
=
conn
.
cursor
()
# Fetch all employee records
cursor
.
execute
(
"
SELECT * FROM EMPLOYE
"
)
...
...
@@ -24,6 +24,7 @@ with tab1:
# Display the DataFrame with Streamlit
st
.
dataframe
(
df
)
st
.
stop
()
conn
.
close
()
with
tab2
:
st
.
title
(
"
Création de compte employé
"
)
...
...
@@ -59,8 +60,7 @@ with tab2:
# Submit button
if
st
.
button
(
"
Create Account
"
):
# Connect to the database
with
sqlite3
.
connect
(
'
donnees\company.db
'
)
as
conn
:
cursor
=
conn
.
cursor
()
conn
=
sqlite3
.
connect
(
r
'
C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db
'
)
# Check if the employee already exists
cursor
.
execute
(
"""
SELECT NUMERO_EMPLOYE FROM EMPLOYE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment