Client test mit veränderter Kundenverwaltung.
This commit is contained in:
parent
de127b18d4
commit
4abc71dd7b
|
@ -61,8 +61,8 @@ class Client():
|
||||||
Client.clients += 1
|
Client.clients += 1
|
||||||
|
|
||||||
def check_in(self, room, key_num):
|
def check_in(self, room, key_num):
|
||||||
room_list[reference.index(room)].occupy(self.surname, self.period)
|
room_list[reference.index(str(room))].occupy(self.surname, self.period)
|
||||||
self.room = room
|
self.room = str(room)
|
||||||
num_ = "key_" + str(key_num) + ".hand_out_key(" + str(key_num) + "," + "'" + str(self.surname) + "')"
|
num_ = "key_" + str(key_num) + ".hand_out_key(" + str(key_num) + "," + "'" + str(self.surname) + "')"
|
||||||
try:
|
try:
|
||||||
exec(num_)
|
exec(num_)
|
||||||
|
@ -398,11 +398,38 @@ def clear():
|
||||||
|
|
||||||
|
|
||||||
def add_client():
|
def add_client():
|
||||||
|
while True:
|
||||||
name = input("Name : ")
|
name = input("Name : ")
|
||||||
|
if name.isalpha():
|
||||||
|
break
|
||||||
|
while True:
|
||||||
surname = input("Nachname :")
|
surname = input("Nachname :")
|
||||||
|
if surname.isalpha():
|
||||||
|
break
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print("Aufenthaltszeitraum")
|
||||||
|
while True:
|
||||||
|
day_arrival = input("Anreisetag: ")
|
||||||
|
if day_arrival.isdigit() and 0 < int(day_arrival) and int(day_arrival) < 28:
|
||||||
|
break
|
||||||
|
while True:
|
||||||
|
month_arrival = input("Anreisemonat: ")
|
||||||
|
if month_arrival.isdigit() and 0 < int(month_arrival) and int(month_arrival) < 12:
|
||||||
|
break
|
||||||
|
while True:
|
||||||
|
day_depature = input("Abreisetag: ")
|
||||||
|
if day_depature.isdigit() and 0 < int(day_depature) and int(day_depature) < 28:
|
||||||
|
break
|
||||||
|
while True:
|
||||||
|
month_depature = input("Abreisemonat: ")
|
||||||
|
if month_depature.isdigit() and 0 < int(month_depature) and int(month_depature) < 12:
|
||||||
|
break
|
||||||
|
break
|
||||||
|
period = str(day_arrival) + "," +str(month_arrival) + "," + str(day_depature) + "," + str(month_depature)
|
||||||
|
print(period)
|
||||||
client_num = "c" + str(Client.clients)
|
client_num = "c" + str(Client.clients)
|
||||||
room_num = None
|
room_num = None
|
||||||
period = input("Aufenthaltszeitraum :")
|
|
||||||
key_num = None
|
key_num = None
|
||||||
c = str(client_num) + " = Client(" + '"' + str(name) + '"' + "," + '"' + \
|
c = str(client_num) + " = Client(" + '"' + str(name) + '"' + "," + '"' + \
|
||||||
str(surname) + '"' + "," + '"' + str(client_num) + '"' + "," + '"' + str(room_num) \
|
str(surname) + '"' + "," + '"' + str(client_num) + '"' + "," + '"' + str(room_num) \
|
||||||
|
@ -497,7 +524,7 @@ Zimmerverwaltung
|
||||||
Schküsselverwaltung
|
Schküsselverwaltung
|
||||||
Dienstpläne\n""")
|
Dienstpläne\n""")
|
||||||
|
|
||||||
"""-----------INTERFACE-----ACCOUNTING------------------"""
|
#"""-----------INTERFACE-----ACCOUNTING------------------"""
|
||||||
|
|
||||||
if system == system_list[0]: #Accounting
|
if system == system_list[0]: #Accounting
|
||||||
clear()
|
clear()
|
||||||
|
@ -555,7 +582,7 @@ Abbrechen
|
||||||
clear()
|
clear()
|
||||||
break
|
break
|
||||||
|
|
||||||
"""-----------INTERFACE-----CLIENT------------------"""
|
#"""-----------INTERFACE-----CLIENT------------------"""
|
||||||
|
|
||||||
if system == system_list[1]: #Client #bearbeitet ab hier
|
if system == system_list[1]: #Client #bearbeitet ab hier
|
||||||
clear()
|
clear()
|
||||||
|
@ -579,24 +606,49 @@ Abbrechen
|
||||||
c = add_client()
|
c = add_client()
|
||||||
exec(c)
|
exec(c)
|
||||||
clear()
|
clear()
|
||||||
|
continue
|
||||||
|
|
||||||
if client == "2":
|
if client == "2":
|
||||||
print("Kunde anzeigen\n")
|
print("Kunde anzeigen\n")
|
||||||
print(client_list)
|
print(client_list)
|
||||||
while True:
|
while True:
|
||||||
k = input("Über welchen Kunden wollen sie sich Information anzeigen lassen? ")
|
k = input("Über welchen Kunden wollen sie sich Information anzeigen lassen? ")
|
||||||
if k in bill_list:
|
if k in client_list:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print("Dieser Kunde ist leider nicht im System.")
|
print("Dieser Kunde ist leider nicht im System.")
|
||||||
c = str(k) + ".info()"
|
c = str(k) + ".info()"
|
||||||
exec(c)
|
exec(c)
|
||||||
clear()
|
clear()
|
||||||
|
continue
|
||||||
|
|
||||||
if client == "3":
|
if client == "3":
|
||||||
print("Kunde einchecken\n")
|
print("Kunde einchecken\n")
|
||||||
clear()
|
print("Welchen Kunden möchten Sie einchecken?")
|
||||||
|
print(client_list)
|
||||||
|
while True:
|
||||||
|
client = input()
|
||||||
|
if client in client_list:
|
||||||
|
break
|
||||||
|
while True:
|
||||||
|
print("Zimmernummer")
|
||||||
|
room_ = input()
|
||||||
|
if room_ in reference:
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
print("Dieses Zimmer ist in unserem hotel leider nicht vorhanden.")
|
||||||
|
|
||||||
|
room_types = [["Single", 10], ["Double", 20], ["Suite", 30], ["Panorama_Suite", 40]]
|
||||||
|
for i in room_types:
|
||||||
|
if i[0] == room_:
|
||||||
|
key_num = i[1]+1
|
||||||
|
print("Der Kunde erhält den Schlüssel", key_num)
|
||||||
|
|
||||||
|
check = str(client) + ".check_in(" + "'" + str(room_) + "'" + "," + str(key_num)+ ")"
|
||||||
|
print(check)
|
||||||
|
exec(check)
|
||||||
|
clear()
|
||||||
|
continue
|
||||||
if client == "4":
|
if client == "4":
|
||||||
print("Zimmer wechseln\n")
|
print("Zimmer wechseln\n")
|
||||||
clear()
|
clear()
|
||||||
|
@ -613,7 +665,7 @@ Abbrechen
|
||||||
clear()
|
clear()
|
||||||
break
|
break
|
||||||
|
|
||||||
"""-----------INTERFACE-----ROOM------------------"""
|
#"""-----------INTERFACE-----ROOM------------------"""
|
||||||
|
|
||||||
if system == system_list[2]: #Room
|
if system == system_list[2]: #Room
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user