-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbank_system.py
295 lines (263 loc) · 11.8 KB
/
bank_system.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
from tkinter import *
choice = 0
choice1 = 0
cashheader = "Null"
manageheader = "Null"
class Demo(object):
header = "Null"
def __init__(self,name,prps):
self.name = name
self.prps = prps
self.next = "Null"
@staticmethod
def print_content():
global data
global data2
content = data.get()
content2 = data2.get()
print ('------------------------------------')
print ('Name of Customer : ',content)
print ('Purpose of Customer : ',content2)
print ('------------------------------------')
print ()
print ("Above new customer added ...")
print ()
name = content
prps = content2
print ("")
if Demo.header == "Null":
Demo.header = Demo(name,prps)
else:
temp = Demo.header
while temp.next != "Null":
temp = temp.next
newNodel = Demo(name,prps)
temp.next = newNode
temp = Demo.header
if temp.next == "Null":
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("")
else:
print ("")
while temp.next != "Null":
print ("|", temp.name ," : ",temp.prps,"|",end='')
temp = temp.next
print ("|", temp.name ," : ",temp.prps,"|")
print ("")
top = Tk()
top.title('The Main Window')
top.geometry("500x500")
top.resizable(0,0)
data = StringVar()
data2 = StringVar()
Label(top,text="Name of Customer : ").grid(row=1,sticky=W)
Entry(top,textvariable=data).grid(row=1,column=1)
Label(top,text="PRPS of Customer :").grid(row=2,sticky=W)
Entry(top,textvariable=data2).grid(row=2,column=1)
b1 = Button(top,text="continue",command=Demo.print_content)
b1.grid(row=4,column=1)
b2 = Button (top,text="Quit",command=top.destroy)
b2.grid(row=6,column=1)
top.mainloop()
while choice != "4":
print("")
print("1. Enqiry Officer 2. Casiear 3. Manager 4. Exit")
choice = input("Enter your choice : ")
if choice == "1":
print("")
print(" ----- Welcome Enquiry Officier ----- ")
eopassword = input("Enter your password : ")
if eopassword == "eo":
print("")
temp = Demo.header
if temp.next == "Null":
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("Please enter where to shift this appointment : ")
shiftapp = input("1. Cashier 2. Manager ")
if shiftapp == "1":
if cashheader == "Null":
cashheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = cashheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
elif shiftapp == "2":
if manageheader == "Null":
manageheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = manageheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
print("")
print ("The Queue is empty ...")
print("")
elif temp.next.next == "Null":
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("Please enter where to shift this appointment : ")
shiftapp = input("1. Cashier 2. Manager ")
if shiftapp == "1":
if cashheader == "Null":
cashheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = cashheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
elif shiftapp == "2":
if manageheader == "Null":
manageheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = manageheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
temp = temp.next
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("Please enter where to shift this appointment : ")
shiftapp = input("1. Cashier 2. Manager ")
if shiftapp == "1":
if cashheader == "Null":
cashheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = cashheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
elif shiftapp == "2":
if manageheader == "Null":
manageheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = manageheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
print("")
print ("The Queue is empty ...")
print("")
else:
temp = Demo.header
while(temp.next != "Null"):
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("Please enter where to shift this appointment : ")
shiftapp = input("1. Cashier 2. Manager ")
if shiftapp == "1":
if cashheader == "Null":
cashheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = cashheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
elif shiftapp == "2":
if manageheader == "Null":
manageheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = manageheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
temp = temp.next
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print ("Please enter where to shift this appointment : ")
shiftapp = input("1. Cashier 2. Manager ")
if shiftapp == "1":
if cashheader == "Null":
cashheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = cashheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
elif shiftapp == "2":
if manageheader == "Null":
manageheader = Demo(temp.name,temp.prps)
Demo.header = "Null"
else:
tempcash = manageheader
while tempcash.next != "Null":
tempcash = tempcash.next
tempcash.next = Demo(temp.name,temp.prps)
print(" Queue is empty ...")
elif choice == "2":
print("")
print(" ----- Welcome Cashier ----- ")
copassword = input("Enter your password : ")
if copassword == "co":
print("")
temp = cashheader
if temp.next == "Null":
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
while temp.next != "Null":
print ("|", temp.name ," : ",temp.prps,"|",end='')
temp = temp.next
print ("|", temp.name ," : ",temp.prps,"|")
print ("")
print(" Queue is empty now ... ")
else:
print ("")
while temp.next != "Null":
print ("|", temp.name ," : ",temp.prps,"|",end='')
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
temp = temp.next
print ("|", temp.name ," : ",temp.prps,"|")
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
print ("")
print (" Queue is empty ... ")
else:
print(" ******************** Wrong password *************************")
elif choice == "3":
print("")
print(" ----- Welcome Manager ----- ")
copassword = input("Enter your password : ")
if copassword == "mo":
print("")
temp = manageheader
if temp.next == "Null":
print ("")
print ("|", temp.name ," : ",temp.prps,"|")
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
while temp.next != "Null":
print ("|", temp.name ," : ",temp.prps,"|",end='')
temp = temp.next
print ("|", temp.name ," : ",temp.prps,"|")
print ("")
print(" Queue is empty now ... ")
else:
print ("")
while temp.next != "Null":
print ("|", temp.name ," : ",temp.prps,"|",end='')
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
temp = temp.next
print ("|", temp.name ," : ",temp.prps,"|")
print (" ----- Is task completed ----- ")
chcashier = input(" | When task is comleted press 1 |")
print ("")
print (" Queue is empty ... ")
else:
print(" ******************** Wrong password *************************")
elif choice == "4":
print("Thanks for using our application ... ")