-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain program.py
More file actions
85 lines (45 loc) · 1.8 KB
/
Main program.py
File metadata and controls
85 lines (45 loc) · 1.8 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
from programs import flat_management,maintenance_fee,reporting,resident_information,resident_management
import mysql.connector as m
import sys
mycon=m.connect(host="localhost",user="root",passwd="0099",database="APARTMENTMANAGEMENT")
cur=mycon.cursor()
def main():
print("\nWELCOME TO APARTMENT MANAGEMENT SYSTEM")
print("__________________________________________________________")
while True:
print("\nENTER 1 IF YOU ARE ADMINISTRATOR")
print("ENTER 2 IF YOU ARE USER")
print("ENTER 3 TO EXIT")
ch=int(input("\nENTER YOUR CHOICE:"))
if ch==1:
admin=input("\nENTER THE ADMIN ID:")
password=input("\nENTER THE PASSWORD:")
if admin=="admin123" and password=="apartment001":
print("\nLOGIN SUCCESSFUL")
print("\nWELCOME")
print("_____________")
print("\nENTER 1 FOR FLAT MANAGEMENT")
print("ENTER 2 FOR RESIDENT MANAGEMENT")
print("ENTER 3 FOR MAINTENANCE COLLECTION")
print("ENTER 4 FOR STATEMENTS")
ch=int(input("\nENTER YOUR CHOICE:"))
if ch==1:
flat_management.mainflat()
elif ch==2:
resident_management.mainresident()
elif ch==3:
maintenance_fee.mainmaintenance()
elif ch==4:
reporting.mainreporting()
else:
print("INVALID CHOICE")
else:
print("\nINVALID USERNAME OR PASSWORD")
elif ch==2:
resident_information.mainpayment()
elif ch==3:
print("\nTHANK YOU")
sys.exit()
else:
print("INAVLID INPUT")
main()