forked from JYunth/hotel-management-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
62 lines (47 loc) · 3.04 KB
/
main.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
from tkinter import *
import check_in_ui
import check_out
import get_info
import customer_info
import about
import os
class Hotel:
def __init__(self, root):
self.root = root
pad = 3
self.root.title("Hotel Management System: OceanView")
self.root.iconbitmap("hms.ico")
self.root.geometry("{0}x{1}+0+0".format(self.root.winfo_screenwidth() - pad, self.root.winfo_screenheight() - pad))
# create mainframe to add message
top = Frame(self.root)
top.pack(side="top")
# create frame to add buttons
bottom = Frame(self.root)
bottom.pack(side="top")
# display message
self.label = Label(top, font=('Bookman Old Style', 50, 'bold'), text="Welcome to OceanView!", fg="#330000", anchor="center")
self.label.grid(row=0, column=3, pady = (0, 30))
# create check in button
self.check_in_button = Button(bottom, text="Check In", font=('Bookman Old Style', 20), bg="#330000", relief=RIDGE, height=2, width=50, fg="white", anchor="center", command=check_in_ui.check_in_ui_fun)
self.check_in_button.grid(row=0, column=2, padx=10, pady=10)
# create check out button
self.check_out_button = Button(bottom, text="Check Out", font=('Bookman Old Style', 20), bg="#330000", relief=RIDGE, height=2, width=50, fg="white", anchor="center", command=check_out.check_out_ui)
self.check_out_button.grid(row=1, column=2, padx=10, pady=10)
# create show list button
self.room_info_button = Button(bottom, text="Customer Room Info", font=('Bookman Old Style', 20), bg="#330000", relief=RIDGE, height=2, width=50, fg="white", anchor="center", command=get_info.get_info_ui)
self.room_info_button.grid(row=2, column=2, padx=10, pady=10)
# create get information of all the guest
self.get_info_button = Button(bottom, text="All Occupants Info", font=('Bookman Old Style', 20), bg="#330000", relief=RIDGE, height=2, width=50, fg="white", anchor="center", command=customer_info.customer_info_ui)
self.get_info_button.grid(row=3, column=2, padx=10, pady=10)
# button to exit the program
self.exit_button = Button(bottom, text="Exit", font=('Bookman Old Style', 20), bg="#000000", relief=RIDGE, height=1, width=30, fg="white", anchor="center", command=quit)
self.exit_button.grid(row=4, column=2, padx=10, pady=10)
# button to view the about page
self.about_button = Button(bottom, text = 'about', font = ('Bookman Old Style', 15), bg = '#450000', relief=RIDGE, height=1, width=30, fg="white", anchor="center", command=about.about_ui)
self.about_button.grid(row = 5, column = 2, padx = 10, pady = 10)
def home_ui():
root = Tk()
application = Hotel(root)
root.mainloop()
if __name__ == '__main__':
home_ui()