-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
102 lines (89 loc) · 3.39 KB
/
app.py
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
'''
Author: John Jayson B. De Leon
Github: github.com/savjaylade84
Email: savjaylade84@gmail.com
'''
from Operation.Operation import Operation
from Admin.Admin import Admin
from Terminal.print import Print
def main() -> None:
_bank_system = Operation()
_admin = Admin()
_print = Print()
_exit_answer = False
_answer = ''
print("<<<<<<<<<<( Welcome to Mock Bank System! )>>>>>>>>>>>")
print(f"\n[ Creator ]: John Jayson B. De Leon\n"+
f"[ Gmail ]: savjaylade84@gmail.com\n"+
f"[ Github ]: savjaylade84\n"+
f"[ Version ]: 3.9v")
while True:
_print.header("Main Menu")
_answer:int = int(_print.menu(
header='New Transaction',
menu_header='Enter A Instruction',
menu=[
'Login',
'Signup',
'Admin',
'Quit / Exit'
],prompt='Enter'))
if _answer == 1:
#get account info
if _bank_system.Login():
_bank_system.print_account_info()
while not _exit_answer:
#get user instruction
_answer = _bank_system.get_instruction()
if _answer == 1:
_bank_system.Deposite()
elif _answer == 2:
_bank_system.Withdraw()
elif _answer == 3:
_bank_system.Balance()
elif _answer == 4:
_bank_system.Transaction_History()
elif _answer == 5:
_bank_system.Change_Pin()
elif _answer == 6:
_print.header('Exit Successful!')
#_bank_system.Save()
break
else:
_print.status("Warning","Invalid Input!")
elif _answer == 2:
_bank_system.Signup()
elif _answer == 3:
#get account info
if _admin.Login():
_admin.print_account_info()
while not _exit_answer:
#get user instruction
_answer = _admin.get_instruction()
if _answer == 1:
_admin.View_List()
elif _answer == 2:
_admin.View_Account_Information()
elif _answer == 3:
_admin.View_Account_History()
elif _answer == 4:
_admin.View_Edited_Account_History()
elif _answer == 5:
_admin.Edit_Account()
elif _answer == 6:
_admin.Change_Password()
elif _answer == 7:
_print.header('Exit Successful!')
#_bank_system.Save()
break
else:
_print.status("Warning","Invalid Input!")
elif _answer == 4:
_print.header('Exit Successful')
exit(0)
else:
_print.status("Warning","Invalid Input!")
del _bank_system
del _admin
if __name__ == '__main__':
main()