-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
60 lines (54 loc) · 1.46 KB
/
main.py
File metadata and controls
60 lines (54 loc) · 1.46 KB
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
55
56
57
58
59
60
from operations import *
def menu():
if not login():
print("Login failed")
return
while True:
print("""
Employee Management System (SQLite Version)
1. View Employees
2. Add Employee
3. Update Salary
4. Update Employee Department
5. Delete Employee
6. View Departments
7. Add Department
8. Add User
9.nth highest salary employee details
10.nth lowest salary employee details
11.No of Employees in each department
12.Employee's name and departmentname
13. Exit
""")
choice = input("Enter choice: ")
if choice == "1":
view_employees()
elif choice == "2":
add_employee()
elif choice == "3":
update_salary()
elif choice == "4":
update_employee_department()
elif choice == "5":
delete_employee()
elif choice == "6":
view_departments()
elif choice == "7":
add_department()
elif choice == "8":
add_user()
elif choice == "9":
nth_highest_salary()
elif choice == "10":
nth_lowest_salary()
elif choice == "11":
no_of_emp_in_deptartments()
elif choice == "12":
employeename_departmentname()
elif choice == "13":
print("Exiting...")
break
else:
print("Invalid choice\n")
if __name__ == "__main__":
menu()