FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python-Programs/Python_CURD_cmd/EMS.py at master · Scarlet-Coder/Python-Programs · GitHub
Scarlet-Coder
/
Python-Programs
Public
forked from
codehouseindia/Python-Programs
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Python-Programs
/
Python_CURD_cmd
/
EMS.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (53 loc) · 1.25 KB
Breadcrumbs
Python-Programs
/
Python_CURD_cmd
/
EMS.py
Copy path
File metadata and controls
54 lines (53 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from
Employee
import
*
from
EMS_Services
import
EMS_Services
if
__name__
==
"__main__"
:
while
(
True
):
print
(
"1. Add Record: "
)
print
(
"2. View All: "
)
print
(
"3. Search By ID: "
)
print
(
"4. Delete By ID: "
)
print
(
"5. Exit "
)
choice
=
int
(
input
(
"Enter Your Choice From 1-5 "
))
if
(
choice
==
1
):
emp
=
Employee
()
emp
.
setId
(
input
(
"Enter ID: "
))
emp
.
setName
(
input
(
"Enter NAME: "
))
emp
.
setSalary
(
input
(
"Enter SALARY: "
))
emp
.
setAddress
(
input
(
"Enter ADDRESS: "
))
if
(
EMS_Services
.
addEmployee
(
emp
)):
print
(
"Record Inserted"
)
else
:
print
(
"Id Already Exists"
)
elif
(
choice
==
2
):
lst
=
EMS_Services
.
getAllEmployee
()
if
(
len
(
lst
)
==
0
):
print
(
"No Record"
)
else
:
for
e
in
lst
:
print
(
e
)
elif
(
choice
==
3
):
id
=
input
(
"Enter id : "
)
emp
=
EMS_Services
.
searchById
(
id
)
if
(
emp
==
None
):
print
(
"No Such Id Exists."
)
else
:
print
(
emp
)
elif
(
choice
==
4
):
id
=
int
(
input
(
"Enter id : "
))
if
(
EMS_Services
.
deleteById
(
id
)):
print
(
"Record Deleted"
)
else
:
print
(
"No Such Id Present"
)
elif
(
choice
==
5
):
pass
elif
(
choice
==
6
):
pass
elif
(
choice
==
7
):
pass
elif
(
choice
==
8
):
pass
elif
(
choice
==
9
):
print
(
"Thanks"
)
break
else
:
print
(
"No Operation Present Here Related To Your Input"
)
Back
|
FazBrowse Home
|
New Git URL