Вы находитесь на странице: 1из 34

#project hotel management system

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Hotel_management_system(object):
def recep(self):
self.Receptionist = QtWidgets.QDialog()
self.ui = Ui_Receptionist()
self.ui.setupUi(self.Receptionist)
self.Receptionist.show()
def Staff(self):
self.staff = QtWidgets.QDialog()
self.ui = Ui_staff()
self.ui.setupUi(self.staff)
self.staff.show()
def Room(self):
self.room = QtWidgets.QDialog()
self.ui = Ui_room()
self.ui.setupUi(self.room)
self.room.show()
def manag(self):
self.Management = QtWidgets.QDialog()
self.ui = Ui_Management()
self.ui.setupUi(self.Management)
self.Management.show()
def menu(self):
self.menu = QtWidgets.QDialog()
self.ui = Ui_menu()
self.ui.setupUi(self.menu)
self.menu.show()
def Bill(self):
self.billing = QtWidgets.QDialog()
self.ui = Ui_billing()
self.ui.setupUi(self.billing)
self.billing.show()
def salary(self):
self.salary = QtWidgets.QDialog()
self.ui = Ui_salary()
self.ui.setupUi(self.salary)
self.salary.show()
def cust_detail(self):
self.customer = QtWidgets.QDialog()
self.ui = Ui_customer()
self.ui.setupUi(self.customer)
self.customer.show()
def Chef(self):
self.chef = QtWidgets.QDialog()
self.ui = Ui_chef()
self.ui.setupUi(self.chef)
self.chef.show()
def inventory(self):
self.inventory = QtWidgets.QDialog()
self.ui = Ui_inventory()
self.ui.setupUi(self.inventory)
self.inventory.show()
def hotelattendent(self):
self.hotelatend = QtWidgets.QDialog()
self.ui = Ui_hotelatend()
self.ui.setupUi(self.hotelatend)
self.hotelatend.show()
def about(self):
self.aboutus = QtWidgets.QDialog()
self.ui = Ui_aboutus()
self.ui.setupUi(self.aboutus)
self.aboutus.show()

def setupUi(self, Hotel_management_system):


Hotel_management_system.setObjectName("Hotel_management_system")
Hotel_management_system.resize(1512, 1083)
self.centralwidget = QtWidgets.QWidget(Hotel_management_system)
self.centralwidget.setObjectName("centralwidget")
self.image = QtWidgets.QLabel(self.centralwidget)
self.image.setGeometry(QtCore.QRect(0, -330, 1681, 1711))
self.image.setText("")
self.image.setPixmap(QtGui.QPixmap("C:/Users/The laptop store/Desktop/hotel
main.jpg"))
self.image.setObjectName("image")
self.reception = QtWidgets.QPushButton(self.centralwidget)
self.reception.setGeometry(QtCore.QRect(107, 240, 201, 51))
self.reception.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.reception.setObjectName("reception")
self.reception.clicked.connect(self.recep)
self.staff = QtWidgets.QPushButton(self.centralwidget)
self.staff.setGeometry(QtCore.QRect(370, 240, 201, 51))
self.staff.setStyleSheet("background-color: qlineargradient(spread:repeat,
x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0, 245), stop:1 rgba(255, 255,
255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.staff.setObjectName("staff")
self.staff.clicked.connect(self.Staff)
self.management = QtWidgets.QPushButton(self.centralwidget)
self.management.setGeometry(QtCore.QRect(892, 240, 201, 51))
self.management.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.management.setObjectName("management")
self.management.clicked.connect(self.manag)
self.roomdetails = QtWidgets.QPushButton(self.centralwidget)
self.roomdetails.setGeometry(QtCore.QRect(635, 240, 201, 51))
self.roomdetails.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.roomdetails.setObjectName("roomdetails")
self.roomdetails.clicked.connect(self.Room)
self.Menu = QtWidgets.QPushButton(self.centralwidget)
self.Menu.setGeometry(QtCore.QRect(1156, 240, 201, 51))
self.Menu.setStyleSheet("background-color: qlineargradient(spread:repeat,
x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0, 245), stop:1 rgba(255, 255,
255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Menu.setObjectName("Menu")
self.Menu.clicked.connect(self.menu)
self.Salary = QtWidgets.QPushButton(self.centralwidget)
self.Salary.setGeometry(QtCore.QRect(531, 360, 180, 51))
self.Salary.setStyleSheet("background-color: qlineargradient(spread:repeat,
x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0, 245), stop:1 rgba(255, 255,
255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Salary.setObjectName("Salary")
self.Salary.clicked.connect(self.salary)
self.Billing = QtWidgets.QPushButton(self.centralwidget)
self.Billing.setGeometry(QtCore.QRect(256, 360, 180, 51))
self.Billing.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Billing.setObjectName("Billing")
self.Billing.clicked.connect(self.Bill)
self.customerdetail = QtWidgets.QPushButton(self.centralwidget)
self.customerdetail.setGeometry(QtCore.QRect(790, 361, 180, 50))
self.customerdetail.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.customerdetail.setObjectName("customerdetail")
self.customerdetail.clicked.connect(self.cust_detail)
self.Chefs = QtWidgets.QPushButton(self.centralwidget)
self.Chefs.setGeometry(QtCore.QRect(1056, 360, 180, 51))
self.Chefs.setStyleSheet("background-color: qlineargradient(spread:repeat,
x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0, 245), stop:1 rgba(255, 255,
255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Chefs.setObjectName("Chefs")
self.Chefs.clicked.connect(self.Chef)
self.Inventory = QtWidgets.QPushButton(self.centralwidget)
self.Inventory.setGeometry(QtCore.QRect(390, 480, 160, 51))
self.Inventory.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Inventory.setObjectName("Inventory")
self.Inventory.clicked.connect(self.inventory)
self.Hotelatttendent = QtWidgets.QPushButton(self.centralwidget)
self.Hotelatttendent.setGeometry(QtCore.QRect(672, 480, 160, 51))
self.Hotelatttendent.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Hotelatttendent.setObjectName("Hotelatttendent")
self.Hotelatttendent.clicked.connect(self.hotelattendent)
self.Aboutus = QtWidgets.QPushButton(self.centralwidget)
self.Aboutus.setGeometry(QtCore.QRect(950, 480, 160, 51))
self.Aboutus.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.199153 rgba(85, 0, 0,
245), stop:1 rgba(255, 255, 255, 255));\n"
"background-color: qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1,
stop:0.101695 rgba(85, 49, 0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"color: rgb(255, 255, 255);")
self.Aboutus.setObjectName("Aboutus")
self.Aboutus.clicked.connect(self.about)
self.hotelname = QtWidgets.QLabel(self.centralwidget)
self.hotelname.setGeometry(QtCore.QRect(370, 50, 704, 81))
self.hotelname.setStyleSheet("background-color:
qlineargradient(spread:repeat, x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 49,
0, 255), stop:1 rgba(255, 255, 255, 255));\n"
"font: italic 8pt \"Brush Script MT\";\n"
"font: 8pt \"Matura MT Script Capitals\";\n"
"font: 24pt \"Old English Text MT\";")
self.hotelname.setObjectName("hotelname")
Hotel_management_system.setCentralWidget(self.centralwidget)
self.statusBar = QtWidgets.QStatusBar(Hotel_management_system)
self.statusBar.setObjectName("statusBar")
Hotel_management_system.setStatusBar(self.statusBar)

self.retranslateUi(Hotel_management_system)
QtCore.QMetaObject.connectSlotsByName(Hotel_management_system)

def retranslateUi(self, Hotel_management_system):


_translate = QtCore.QCoreApplication.translate

Hotel_management_system.setWindowTitle(_translate("Hotel_management_system", "Hotel
Management System"))
self.reception.setText(_translate("Hotel_management_system", "Reception"))
self.staff.setText(_translate("Hotel_management_system", "Staff"))
self.management.setText(_translate("Hotel_management_system",
"Management"))
self.roomdetails.setText(_translate("Hotel_management_system", "Room
Details"))
self.Menu.setText(_translate("Hotel_management_system", "Menu"))
self.Salary.setText(_translate("Hotel_management_system", "Salary"))
self.Billing.setText(_translate("Hotel_management_system", "Billing"))
self.customerdetail.setText(_translate("Hotel_management_system", "Customer
detail"))
self.Chefs.setText(_translate("Hotel_management_system", "Chefs"))
self.Inventory.setText(_translate("Hotel_management_system", "Inventory"))
self.Hotelatttendent.setText(_translate("Hotel_management_system", "Hotel
Attendent"))
self.Aboutus.setText(_translate("Hotel_management_system", "About Us"))
self.hotelname.setText(_translate("Hotel_management_system",
"<html><head/><body><p align=\"center\"><span style=\" font-size:28pt;
color:#ffffff;\">Hotel Management System</span></p></body></html>"))
class Ui_Receptionist(object):
def setupUi(self, Receptionist):
Receptionist.setObjectName("Receptionist")
Receptionist.resize(842, 775)
Receptionist.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.label = QtWidgets.QLabel(Receptionist)
self.label.setGeometry(QtCore.QRect(-20, -50, 971, 901))
self.label.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label.setAutoFillBackground(False)
self.label.setFrameShape(QtWidgets.QFrame.NoFrame)
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/Hotel-Reception.jpg"))
self.label.setWordWrap(False)
self.label.setObjectName("label")
self.pushButton_3 = QtWidgets.QPushButton(Receptionist)
self.pushButton_3.setGeometry(QtCore.QRect(80, 670, 112, 34))
self.pushButton_3.clicked.connect(self.Add)
self.pushButton_3.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_2 = QtWidgets.QPushButton(Receptionist)
self.pushButton_2.setGeometry(QtCore.QRect(230, 670, 112, 34))
self.pushButton_2.clicked.connect(self.Update)
self.pushButton_2.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.pushButton_2.setObjectName("pushButton_2")
self.pushButton = QtWidgets.QPushButton(Receptionist)
self.pushButton.setGeometry(QtCore.QRect(360, 670, 112, 34))
self.pushButton.clicked.connect(self.Delete)
self.pushButton.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.pushButton.setObjectName("pushButton")
self.label_2 = QtWidgets.QLabel(Receptionist)
self.label_2.setGeometry(QtCore.QRect(100, 190, 161, 30))
self.label_2.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(0, 0, 0);\n"
"color: rgb(0, 0, 0);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(Receptionist)
self.label_3.setGeometry(QtCore.QRect(100, 260, 180, 30))
self.label_3.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(Receptionist)
self.label_4.setGeometry(QtCore.QRect(100, 330, 90, 30))
self.label_4.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(Receptionist)
self.label_5.setGeometry(QtCore.QRect(100, 390, 160, 30))
self.label_5.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(Receptionist)
self.label_6.setGeometry(QtCore.QRect(100, 451, 130, 30))
self.label_6.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(Receptionist)
self.label_7.setGeometry(QtCore.QRect(100, 520, 160, 30))
self.label_7.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_7.setObjectName("label_7")
self.aa = QtWidgets.QLineEdit(Receptionist)
self.aa.setGeometry(QtCore.QRect(560, 190, 150, 25))
self.aa.setObjectName("lineEdit")
self.a = QtWidgets.QLineEdit(Receptionist)
self.a.setGeometry(QtCore.QRect(560, 260, 150, 25))
self.a.setObjectName("lineEdit_2")
self.b = QtWidgets.QLineEdit(Receptionist)
self.b.setGeometry(QtCore.QRect(560, 330, 140, 25))
self.b.setObjectName("lineEdit_3")
self.c = QtWidgets.QLineEdit(Receptionist)
self.c.setGeometry(QtCore.QRect(560, 390, 140, 25))
self.c.setObjectName("lineEdit_4")
self.d = QtWidgets.QLineEdit(Receptionist)
self.d.setGeometry(QtCore.QRect(560, 450, 140, 25))
self.d.setObjectName("lineEdit_5")
self.e = QtWidgets.QLineEdit(Receptionist)
self.e.setGeometry(QtCore.QRect(560, 510, 140, 25))
self.e.setObjectName("lineEdit_6")
self.label_8 = QtWidgets.QLabel(Receptionist)
self.label_8.setGeometry(QtCore.QRect(290, 30, 281, 91))
self.label_8.setStyleSheet("color: rgb(255, 255, 255);\n"
"color: rgb(0, 0, 0);")
self.label_8.setObjectName("label_8")
self.label_9 = QtWidgets.QLabel(Receptionist)
self.label_9.setGeometry(QtCore.QRect(100, 580, 160, 30))
self.label_9.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_9.setObjectName("label_9")
self.f = QtWidgets.QLineEdit(Receptionist)
self.f.setGeometry(QtCore.QRect(560, 570, 140, 25))
self.f.setObjectName("lineEdit_7")

self.retranslateUi(Receptionist)
QtCore.QMetaObject.connectSlotsByName(Receptionist)

def retranslateUi(self, Receptionist):


_translate = QtCore.QCoreApplication.translate
Receptionist.setWindowTitle(_translate("Receptionist", "receptionist"))
self.pushButton_3.setText(_translate("Receptionist", "Add"))
self.pushButton_2.setText(_translate("Receptionist", "Update"))
self.pushButton.setText(_translate("Receptionist", "Delete"))
self.label_2.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt; color:#ffffff;\">Receptionist
ID</span></p></body></html>"))
self.label_3.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt;\">Receptionist
Name</span></p></body></html>"))
self.label_4.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-
size:10pt;\">Contact</span></p></body></html>"))
self.label_5.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt;\">Booking
Details</span></p></body></html>"))
self.label_6.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt;\">Room
details</span></p></body></html>"))
self.label_7.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt;\">Security
contact</span></p></body></html>"))
self.label_8.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:20pt; font-
weight:600;\">Receptionist</span></p></body></html>"))
self.label_9.setText(_translate("Receptionist",
"<html><head/><body><p><span style=\" font-size:10pt;\">Customer
info</span></p></body></html>"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Recept")
cursor=db.cursor()
try:
sql="""INSERT INTO
details(Id,Name,Contact,BookingDetails,RoomDetails,SecurityContact,CustomerInfo)
VALUES(%s,%s,%s,%s,%s,%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text(),self.e.
text(),self.f.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Recept")
cursor=db.cursor()
try:
sql="""update details set Name=%s where Id=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Recept")
cursor=db.cursor()
try:
sql="""delete from details where Id=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_staff(object):
def setupUi(self, staff):
staff.setObjectName("staff")
staff.resize(795, 686)
staff.setMinimumSize(QtCore.QSize(0, 587))
staff.setStyleSheet("background-color: qconicalgradient(cx:0, cy:0,
angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69),
stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208),
stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130),
stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625
rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));")
self.label = QtWidgets.QLabel(staff)
self.label.setGeometry(QtCore.QRect(-310, -120, 1511, 891))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/staff.jpg"))
self.label.setObjectName("label")
self.c = QtWidgets.QLineEdit(staff)
self.c.setGeometry(QtCore.QRect(600, 413, 140, 30))
self.c.setStyleSheet("background-color: rgb(255, 255, 255);")
self.c.setObjectName("lineEdit_4")
self.d = QtWidgets.QLineEdit(staff)
self.d.setGeometry(QtCore.QRect(600, 483, 140, 30))
self.d.setStyleSheet("background-color: rgb(255, 255, 255);")
self.d.setObjectName("lineEdit_5")
self.label_4 = QtWidgets.QLabel(staff)
self.label_4.setGeometry(QtCore.QRect(120, 332, 91, 31))
self.label_4.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_4.setObjectName("label_4")
self.label_6 = QtWidgets.QLabel(staff)
self.label_6.setGeometry(QtCore.QRect(130, 470, 161, 31))
self.label_6.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_6.setObjectName("label_6")
self.pushButton_2 = QtWidgets.QPushButton(staff)
self.pushButton_2.setGeometry(QtCore.QRect(450, 638, 112, 32))
self.pushButton_2.clicked.connect(self.Delete)
self.pushButton_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton_2.setObjectName("pushButton_2")
self.b = QtWidgets.QLineEdit(staff)
self.b.setGeometry(QtCore.QRect(600, 333, 140, 30))
self.b.setStyleSheet("background-color: rgb(255, 255, 255);")
self.b.setObjectName("lineEdit_3")
self.aa = QtWidgets.QLineEdit(staff)
self.aa.setGeometry(QtCore.QRect(600, 177, 141, 30))
self.aa.setStyleSheet("background-color: rgb(255, 255, 255);")
self.aa.setObjectName("lineEdit")
self.label_3 = QtWidgets.QLabel(staff)
self.label_3.setGeometry(QtCore.QRect(120, 250, 71, 31))
self.label_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_3.setObjectName("label_3")
self.a = QtWidgets.QLineEdit(staff)
self.a.setGeometry(QtCore.QRect(600, 253, 140, 30))
self.a.setStyleSheet("background-color: rgb(255, 255, 255);\n"
"")
self.a.setObjectName("lineEdit_2")
self.label_2 = QtWidgets.QLabel(staff)
self.label_2.setGeometry(QtCore.QRect(340, 10, 110, 70))
self.label_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_2.setFrameShape(QtWidgets.QFrame.WinPanel)
self.label_2.setObjectName("label_2")
self.label_5 = QtWidgets.QLabel(staff)
self.label_5.setGeometry(QtCore.QRect(120, 401, 81, 31))
self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_5.setObjectName("label_5")
self.label_7 = QtWidgets.QLabel(staff)
self.label_7.setGeometry(QtCore.QRect(120, 173, 121, 31))
self.label_7.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_7.setObjectName("label_7")
self.pushButton_3 = QtWidgets.QPushButton(staff)
self.pushButton_3.setGeometry(QtCore.QRect(200, 635, 112, 34))
self.pushButton_3.clicked.connect(self.Update)
self.pushButton_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton_3.setObjectName("pushButton_3")
self.back = QtWidgets.QPushButton(staff)
self.back.setGeometry(QtCore.QRect(70, 636, 112, 34))
self.back.setStyleSheet("background-color: rgb(255, 255, 255);")
self.back.setObjectName("back")
self.pushButton = QtWidgets.QPushButton(staff)
self.pushButton.setGeometry(QtCore.QRect(325, 636, 112, 34))
self.pushButton.clicked.connect(self.Add)
self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton.setObjectName("pushButton")

self.retranslateUi(staff)
QtCore.QMetaObject.connectSlotsByName(staff)

def retranslateUi(self, staff):


_translate = QtCore.QCoreApplication.translate
staff.setWindowTitle(_translate("staff", "Staff"))
self.label_4.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:11pt;\">Address</span></p></body></html>"))
self.label_6.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:11pt;\">personal details</span></p></body></html>"))
self.pushButton_2.setText(_translate("staff", "Delete"))
self.label_3.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:11pt;\">Name</span></p></body></html>"))
self.label_2.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:18pt; font-weight:600;\">Staff</span></p></body></html>"))
self.label_5.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:11pt;\">Contact</span></p></body></html>"))
self.label_7.setText(_translate("staff", "<html><head/><body><p><span
style=\" font-size:11pt;\">Member ID</span></p></body></html>"))
self.pushButton_3.setText(_translate("staff", "Update"))
self.back.setText(_translate("staff", "Back"))
self.pushButton.setText(_translate("staff", "Add"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","staffs")
cursor=db.cursor()
try:
sql="""INSERT INTO
mdetails(MemberId,MemberName,Address,Contact,PersonalDetails) VALUES(%s,%s,%s,%s,
%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","staffs")
cursor=db.cursor()
try:
sql="""update mdetails set MemberName=%s where MemberId=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","staffs")
cursor=db.cursor()
try:
sql="""delete from mdetails where MemberId=%s"""
CustomerId=self.aa.text()
cursor.execute(sql,CustomerId)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_room(object):
def setupUi(self, room):
room.setObjectName("room")
room.resize(950, 925)
room.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label = QtWidgets.QLabel(room)
self.label.setGeometry(QtCore.QRect(-350, -20, 1511, 1011))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/room.jpg"))
self.label.setObjectName("label")
self.label_8 = QtWidgets.QLabel(room)
self.label_8.setGeometry(QtCore.QRect(170, 590, 151, 24))
self.label_8.setStyleSheet("background-color: rgb(255, 202, 66);")
self.label_8.setObjectName("label_8")
self.label_5 = QtWidgets.QLabel(room)
self.label_5.setGeometry(QtCore.QRect(170, 490, 92, 22))
self.label_5.setStyleSheet("background-color: rgb(255, 202, 66);")
self.label_5.setObjectName("label_5")
self.aa = QtWidgets.QLineEdit(room)
self.aa.setGeometry(QtCore.QRect(620, 332, 149, 25))
self.aa.setStyleSheet("background-color: rgb(255, 255, 255);")
self.aa.setObjectName("lineEdit")
self.c = QtWidgets.QLineEdit(room)
self.c.setGeometry(QtCore.QRect(620, 490, 146, 25))
self.c.setStyleSheet("background-color: rgb(255, 255, 255);")
self.c.setObjectName("lineEdit_4")
self.a = QtWidgets.QLineEdit(room)
self.a.setGeometry(QtCore.QRect(620, 390, 151, 25))
self.a.setStyleSheet("background-color: rgb(255, 255, 255);")
self.a.setObjectName("lineEdit_2")
self.pushButton = QtWidgets.QPushButton(room)
self.pushButton.setGeometry(QtCore.QRect(397, 790, 112, 34))
self.pushButton.clicked.connect(self.Update)
self.pushButton.setStyleSheet("background-color: rgb(255, 202, 66);")
self.pushButton.setObjectName("pushButton")
self.label_7 = QtWidgets.QLabel(room)
self.label_7.setGeometry(QtCore.QRect(170, 440, 81, 25))
self.label_7.setStyleSheet("background-color: rgb(255, 202, 66);\n"
"")
self.label_7.setObjectName("label_7")
self.label_2 = QtWidgets.QLabel(room)
self.label_2.setGeometry(QtCore.QRect(340, 150, 261, 70))
self.label_2.setStyleSheet("\n"
"background-color: rgb(255, 202, 66);")
self.label_2.setObjectName("label_2")
self.pushButton_2 = QtWidgets.QPushButton(room)
self.pushButton_2.setGeometry(QtCore.QRect(130, 790, 112, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("background-color: rgb(255, 202, 66);")
self.pushButton_2.setObjectName("pushButton_2")
self.d = QtWidgets.QLineEdit(room)
self.d.setGeometry(QtCore.QRect(620, 540, 148, 25))
self.d.setStyleSheet("background-color: rgb(255, 255, 255);")
self.d.setObjectName("lineEdit_5")
self.e = QtWidgets.QLineEdit(room)
self.e.setGeometry(QtCore.QRect(620, 600, 148, 25))
self.e.setStyleSheet("background-color: rgb(255, 255, 255);")
self.e.setObjectName("lineEdit_6")
self.label_4 = QtWidgets.QLabel(room)
self.label_4.setGeometry(QtCore.QRect(170, 390, 148, 22))
self.label_4.setStyleSheet("background-color: rgb(255, 202, 66);")
self.label_4.setObjectName("label_4")
self.label_6 = QtWidgets.QLabel(room)
self.label_6.setGeometry(QtCore.QRect(170, 540, 110, 31))
self.label_6.setStyleSheet("background-color: rgb(255, 202, 66);")
self.label_6.setObjectName("label_6")
self.label_3 = QtWidgets.QLabel(room)
self.label_3.setGeometry(QtCore.QRect(170, 340, 123, 24))
self.label_3.setStyleSheet("\n"
"background-color: rgb(255, 202, 66);")
self.label_3.setObjectName("label_3")
self.b = QtWidgets.QLineEdit(room)
self.b.setGeometry(QtCore.QRect(620, 450, 151, 25))
self.b.setStyleSheet("background-color: rgb(255, 255, 255);")
self.b.setObjectName("lineEdit_3")
self.delete_2 = QtWidgets.QPushButton(room)
self.delete_2.setGeometry(QtCore.QRect(260, 790, 112, 34))
self.delete_2.clicked.connect(self.Delete)
self.delete_2.setStyleSheet("background-color: rgb(255, 202, 66);")
self.delete_2.setObjectName("delete_2")

self.retranslateUi(room)
QtCore.QMetaObject.connectSlotsByName(room)

def retranslateUi(self, room):


_translate = QtCore.QCoreApplication.translate
room.setWindowTitle(_translate("room", "roomdetails"))
self.label_8.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Check In Time</span></p></body></html>"))
self.label_5.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Charges</span></p></body></html>"))
self.pushButton.setText(_translate("room", "Update"))
self.label_7.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Allotment</span></p><p><br/></p></body></html>"))
self.label_2.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:20pt; font-weight:600;\">Room detail</span></p></body></html>"))
self.pushButton_2.setText(_translate("room", "Add"))
self.label_4.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Room type</span></p></body></html>"))
self.label_6.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Customer ID</span></p></body></html>"))
self.label_3.setText(_translate("room", "<html><head/><body><p><span
style=\" font-size:10pt;\">Room ID</span></p></body></html>"))
self.delete_2.setText(_translate("room", "Delete"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","roomdetails")
cursor=db.cursor()
try:
sql="""INSERT INTO
room(RoomId,RoomType,Allotment,Charges,CustomerId,CheckInTime) VALUES(%s,%s,%s,%s,
%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text(),self.e.
text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","roomdetails")
cursor=db.cursor()
try:
sql="""update room set CustomerId=%s where RoomId=%s"""
b=self.d.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","roomdetails")
cursor=db.cursor()
try:
sql="""delete from room where RoomId=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_Management(object):
def setupUi(self, Management):
Management.setObjectName("Management")
Management.resize(1011, 770)
self.label = QtWidgets.QLabel(Management)
self.label.setGeometry(QtCore.QRect(0, -70, 1561, 931))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/url5.jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(Management)
self.label_2.setGeometry(QtCore.QRect(340, 40, 240, 80))
self.label_2.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(Management)
self.label_3.setGeometry(QtCore.QRect(160, 190, 70, 30))
self.label_3.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(Management)
self.label_4.setGeometry(QtCore.QRect(160, 250, 110, 30))
self.label_4.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(Management)
self.label_5.setGeometry(QtCore.QRect(160, 320, 120, 29))
self.label_5.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(Management)
self.label_6.setGeometry(QtCore.QRect(160, 390, 90, 30))
self.label_6.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(Management)
self.label_7.setGeometry(QtCore.QRect(160, 460, 140, 30))
self.label_7.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_7.setObjectName("label_7")
self.label_8 = QtWidgets.QLabel(Management)
self.label_8.setGeometry(QtCore.QRect(160, 518, 110, 30))
self.label_8.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.label_8.setObjectName("label_8")
self.label_9 = QtWidgets.QLabel(Management)
self.label_9.setGeometry(QtCore.QRect(160, 580, 80, 30))
self.label_9.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);\n"
"")
self.label_9.setObjectName("label_9")
self.aa = QtWidgets.QLineEdit(Management)
self.aa.setGeometry(QtCore.QRect(600, 180, 150, 25))
self.aa.setObjectName("lineEdit")
self.a = QtWidgets.QLineEdit(Management)
self.a.setGeometry(QtCore.QRect(600, 240, 150, 25))
self.a.setObjectName("lineEdit_2")
self.b = QtWidgets.QLineEdit(Management)
self.b.setGeometry(QtCore.QRect(600, 320, 150, 25))
self.b.setObjectName("lineEdit_3")
self.c = QtWidgets.QLineEdit(Management)
self.c.setGeometry(QtCore.QRect(600, 390, 150, 25))
self.c.setObjectName("lineEdit_4")
self.d = QtWidgets.QLineEdit(Management)
self.d.setGeometry(QtCore.QRect(600, 450, 150, 25))
self.d.setObjectName("lineEdit_5")
self.e = QtWidgets.QLineEdit(Management)
self.e.setGeometry(QtCore.QRect(600, 520, 150, 25))
self.e.setObjectName("lineEdit_6")
self.pushButton_2 = QtWidgets.QPushButton(Management)
self.pushButton_2.setGeometry(QtCore.QRect(150, 680, 112, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.pushButton_2.setObjectName("pushButton_2")
self.update = QtWidgets.QPushButton(Management)
self.update.setGeometry(QtCore.QRect(290, 680, 112, 34))
self.update.clicked.connect(self.Update)
self.update.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.update.setObjectName("update")
self.pushButton = QtWidgets.QPushButton(Management)
self.pushButton.setGeometry(QtCore.QRect(430, 680, 112, 34))
self.pushButton.clicked.connect(self.Delete)
self.pushButton.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(239, 254, 255);")
self.pushButton.setObjectName("pushButton")
self.f = QtWidgets.QLineEdit(Management)
self.f.setGeometry(QtCore.QRect(600, 582, 150, 25))
self.f.setObjectName("lineEdit_7")

self.retranslateUi(Management)
QtCore.QMetaObject.connectSlotsByName(Management)
def retranslateUi(self, Management):
_translate = QtCore.QCoreApplication.translate
Management.setWindowTitle(_translate("Management", "Management"))
self.label_2.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:20pt;\">Management</span></p></body></html>"))
self.label_3.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Staff</span></p></body></html>"))
self.label_4.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Facilities</span></p></body></html>"))
self.label_5.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Inventory</span></p></body></html>"))
self.label_6.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Stock</span></p></body></html>"))
self.label_7.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Employees</span></p></body></html>"))
self.label_8.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Labour</span></p></body></html>"))
self.label_9.setText(_translate("Management", "<html><head/><body><p><span
style=\" font-size:12pt;\">Chefs</span></p></body></html>"))
self.pushButton_2.setText(_translate("Management", "Add"))
self.update.setText(_translate("Management", "Update"))
self.pushButton.setText(_translate("Management", "Delete"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","management")
cursor=db.cursor()
try:
sql="""INSERT INTO
manage(Staff,Facilities,Inventory,Stock,Employees,Labour,Chefs) VALUES(%s,%s,%s,%s,
%s,%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text(),self.e.
text(),self.f.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","management")
cursor=db.cursor()
try:
sql="""update manage set Employees=%s where Staff=%s"""
b=self.d.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()
def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","management")
cursor=db.cursor()
try:
sql="""delete from manage where Staff=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_menu(object):
def setupUi(self, menu):
menu.setObjectName("menu")
menu.resize(852, 731)
self.label = QtWidgets.QLabel(menu)
self.label.setGeometry(QtCore.QRect(-150, -20, 1241, 931))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/menu_gd1_pic2.jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(menu)
self.label_2.setGeometry(QtCore.QRect(120, 206, 140, 41))
self.label_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(menu)
self.label_3.setGeometry(QtCore.QRect(120, 282, 80, 30))
self.label_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(menu)
self.label_4.setGeometry(QtCore.QRect(120, 350, 80, 30))
self.label_4.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(menu)
self.label_5.setGeometry(QtCore.QRect(120, 420, 130, 30))
self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_5.setObjectName("label_5")
self.comboBox = QtWidgets.QComboBox(menu)
self.comboBox.setGeometry(QtCore.QRect(520, 205, 131, 25))
self.comboBox.setStyleSheet("background-color: rgb(255, 255, 255);")
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.comboBox_2 = QtWidgets.QComboBox(menu)
self.comboBox_2.setGeometry(QtCore.QRect(520, 272, 130, 25))
self.comboBox_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.comboBox_2.setObjectName("comboBox_2")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_2.addItem("")
self.comboBox_3 = QtWidgets.QComboBox(menu)
self.comboBox_3.setGeometry(QtCore.QRect(520, 340, 130, 25))
self.comboBox_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.comboBox_3.setObjectName("comboBox_3")
self.comboBox_3.addItem("")
self.comboBox_3.addItem("")
self.comboBox_3.addItem("")
self.comboBox_4 = QtWidgets.QComboBox(menu)
self.comboBox_4.setGeometry(QtCore.QRect(520, 420, 130, 25))
self.comboBox_4.setStyleSheet("background-color: rgb(255, 255, 255);")
self.comboBox_4.setObjectName("comboBox_4")
self.comboBox_4.addItem("")
self.comboBox_4.addItem("")
self.comboBox_4.addItem("")
self.pushButton_2 = QtWidgets.QPushButton(menu)
self.pushButton_2.setGeometry(QtCore.QRect(410, 580, 112, 34))
self.pushButton_2.clicked.connect(self.Order)
self.pushButton_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton_2.setObjectName("pushButton_2")
self.pushButton = QtWidgets.QPushButton(menu)
self.pushButton.setGeometry(QtCore.QRect(540, 580, 112, 34))
self.pushButton.clicked.connect(self.Cancel)
self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton.setObjectName("pushButton")

self.retranslateUi(menu)
QtCore.QMetaObject.connectSlotsByName(menu)

def retranslateUi(self, menu):


_translate = QtCore.QCoreApplication.translate
menu.setWindowTitle(_translate("menu", "menu"))
self.label_2.setText(_translate("menu", "<html><head/><body><p><span
style=\" font-size:12pt;\">Break Fast</span></p></body></html>"))
self.label_3.setText(_translate("menu", "<html><head/><body><p><span
style=\" font-size:12pt;\">Lunch</span></p></body></html>"))
self.label_4.setText(_translate("menu", "<html><head/><body><p><span
style=\" font-size:12pt;\">Dinner</span></p></body></html>"))
self.label_5.setText(_translate("menu", "<html><head/><body><p><span
style=\" font-size:12pt;\">Beverages</span></p></body></html>"))
self.comboBox.setItemText(0, _translate("menu", "Fast Food"))
self.comboBox.setItemText(1, _translate("menu", "Italian food"))
self.comboBox.setItemText(2, _translate("menu", "Sea food"))
self.comboBox_2.setItemText(0, _translate("menu", "Pakistani"))
self.comboBox_2.setItemText(1, _translate("menu", "Fast Food"))
self.comboBox_2.setItemText(2, _translate("menu", "Appetizers"))
self.comboBox_2.setItemText(3, _translate("menu", "Chinese"))
self.comboBox_3.setItemText(0, _translate("menu", "Itallian"))
self.comboBox_3.setItemText(1, _translate("menu", "Chinese"))
self.comboBox_3.setItemText(2, _translate("menu", "Desert"))
self.comboBox_4.setItemText(0, _translate("menu", "Fresh juices"))
self.comboBox_4.setItemText(1, _translate("menu", "Cold drinks"))
self.comboBox_4.setItemText(2, _translate("menu", "Mineral water"))
self.pushButton_2.setText(_translate("menu", "Order"))
self.pushButton.setText(_translate("menu", "Cancel"))

def Order(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","menu")
cursor=db.cursor()
try:
sql="""INSERT INTO food(BreakFast,Lunch,Dinner,Beverages) VALUES(%s,%s,
%s,%s)"""
inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Cancel(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","menu")
cursor=db.cursor()
try:
sql="""delete from food where lunch=%s"""
Id=self.a.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_billing(object):
def setupUi(self, billing):
billing.setObjectName("billing")
billing.resize(799, 801)
billing.setAutoFillBackground(False)
billing.setStyleSheet("background-color: qconicalgradient(cx:0, cy:0,
angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69),
stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208),
stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130),
stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625
rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));\n"
"background-color: rgb(255, 255, 255);")
self.label = QtWidgets.QLabel(billing)
self.label.setGeometry(QtCore.QRect(-70, -30, 1191, 861))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/billing.jpg"))
self.label.setObjectName("label")
self.aa = QtWidgets.QLineEdit(billing)
self.aa.setGeometry(QtCore.QRect(480, 220, 163, 25))
self.aa.setStyleSheet("background-color: rgb(255, 255, 255);")
self.aa.setObjectName("lineEdit")
self.pushButton_2 = QtWidgets.QPushButton(billing)
self.pushButton_2.setGeometry(QtCore.QRect(290, 760, 115, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("background-color: rgb(85, 170, 255);")
self.pushButton_2.setObjectName("pushButton_2")
self.label_4 = QtWidgets.QLabel(billing)
self.label_4.setGeometry(QtCore.QRect(150, 350, 84, 20))
self.label_4.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(billing)
self.label_5.setGeometry(QtCore.QRect(150, 420, 114, 20))
self.label_5.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.label_5.setObjectName("label_5")
self.pushButton = QtWidgets.QPushButton(billing)
self.pushButton.setGeometry(QtCore.QRect(420, 760, 115, 34))
self.pushButton.clicked.connect(self.Update)
self.pushButton.setStyleSheet("background-color: rgb(85, 170, 255);")
self.pushButton.setObjectName("pushButton")
self.credit = QtWidgets.QRadioButton(billing)
self.credit.setGeometry(QtCore.QRect(140, 600, 122, 23))
self.credit.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.credit.setMouseTracking(True)
self.credit.setTabletTracking(False)
self.credit.setAcceptDrops(False)
self.credit.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.credit.setCheckable(False)
self.credit.setObjectName("credit")
self.label_6 = QtWidgets.QLabel(billing)
self.label_6.setGeometry(QtCore.QRect(149, 492, 134, 20))
self.label_6.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.label_6.setObjectName("label_6")
self.debit = QtWidgets.QRadioButton(billing)
self.debit.setGeometry(QtCore.QRect(350, 600, 122, 23))
self.debit.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.debit.setAutoExclusive(True)
self.debit.setObjectName("debit")
self.d = QtWidgets.QLineEdit(billing)
self.d.setGeometry(QtCore.QRect(480, 490, 163, 25))
self.d.setStyleSheet("background-color: rgb(255, 255, 255);")
self.d.setObjectName("lineEdit_5")
self.label_2 = QtWidgets.QLabel(billing)
self.label_2.setGeometry(QtCore.QRect(150, 230, 104, 30))
self.label_2.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.label_2.setObjectName("label_2")
self.b = QtWidgets.QLineEdit(billing)
self.b.setGeometry(QtCore.QRect(480, 350, 164, 25))
self.b.setStyleSheet("background-color: rgb(255, 255, 255);")
self.b.setObjectName("lineEdit_3")
self.label_3 = QtWidgets.QLabel(billing)
self.label_3.setGeometry(QtCore.QRect(330, 50, 144, 90))
self.label_3.setStyleSheet("font: 24pt \"MS Shell Dlg 2\";\n"
"background-color: rgb(85, 170, 255);\n"
"background-color: rgb(85, 170, 255);\n"
"background-color: rgb(85, 170, 255);")
self.label_3.setFrameShape(QtWidgets.QFrame.Panel)
self.label_3.setObjectName("label_3")
self.a = QtWidgets.QLineEdit(billing)
self.a.setGeometry(QtCore.QRect(480, 290, 163, 25))
self.a.setStyleSheet("background-color: rgb(255, 255, 255);")
self.a.setObjectName("lineEdit_2")
self.label_7 = QtWidgets.QLabel(billing)
self.label_7.setGeometry(QtCore.QRect(150, 290, 124, 20))
self.label_7.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.label_7.setObjectName("label_7")
self.c = QtWidgets.QLineEdit(billing)
self.c.setGeometry(QtCore.QRect(480, 420, 163, 25))
self.c.setStyleSheet("background-color: rgb(255, 255, 255);")
self.c.setObjectName("lineEdit_4")
self.cash = QtWidgets.QRadioButton(billing)
self.cash.setGeometry(QtCore.QRect(540, 600, 122, 23))
self.cash.setStyleSheet("background-color: qlineargradient(spread:pad,
x1:0, y1:0, x2:1, y2:1, stop:0.101695 rgba(85, 170, 255, 255), stop:1 rgba(255,
255, 255, 255));")
self.cash.setObjectName("cash")
self.pushButton_3 = QtWidgets.QPushButton(billing)
self.pushButton_3.setGeometry(QtCore.QRect(160, 760, 112, 34))
self.pushButton_3.clicked.connect(self.Back)
self.pushButton_3.setStyleSheet("background-color: rgb(85, 170, 255);")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_4 = QtWidgets.QPushButton(billing)
self.pushButton_4.setGeometry(QtCore.QRect(30, 760, 112, 34))
self.pushButton_4.clicked.connect(self.Delete)
self.pushButton_4.setStyleSheet("background-color: rgb(85, 170, 255);")
self.pushButton_4.setObjectName("pushButton_4")

self.retranslateUi(billing)
QtCore.QMetaObject.connectSlotsByName(billing)

def retranslateUi(self, billing):


_translate = QtCore.QCoreApplication.translate
billing.setWindowTitle(_translate("billing", "Billing"))
self.pushButton_2.setText(_translate("billing", "Add"))
self.label_4.setText(_translate("billing", "Check out"))
self.label_5.setText(_translate("billing", "Total Charges"))
self.pushButton.setText(_translate("billing", "Update"))
self.credit.setText(_translate("billing", "Credit Card"))
self.label_6.setText(_translate("billing", "Payment method"))
self.debit.setText(_translate("billing", "Debit Card"))
self.label_2.setText(_translate("billing", "Customer Id"))
self.label_3.setText(_translate("billing", "<html><head/><body><p><span
style=\" font-size:18pt; font-weight:600;\">Billing</span></p></body></html>"))
self.label_7.setText(_translate("billing", "Customer Name"))
self.cash.setText(_translate("billing", "Cash"))
self.pushButton_3.setText(_translate("billing", "Back"))
self.pushButton_4.setText(_translate("billing", "Delete"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Billing")
cursor=db.cursor()
try:
sql="""INSERT INTO
bill(CustomerId,CustomerName,CheckOutTime,TotalCharges,PaymentMethod) VALUES(%s,%s,
%s,%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Billing")
cursor=db.cursor()
try:
sql="""update bill set CustomerName=%s where CustomerId=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Billing")
cursor=db.cursor()
try:
sql="""delete from bill where CustomerId=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()
class Ui_salary(object):
def setupUi(self, salary):
salary.setObjectName("salary")
salary.setEnabled(True)
salary.resize(802, 812)
salary.setCursor(QtGui.QCursor(QtCore.Qt.UpArrowCursor))
salary.setStyleSheet("background-color: qconicalgradient(cx:0, cy:0,
angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69),
stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208),
stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130),
stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625
rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));")
salary.setSizeGripEnabled(False)
salary.setModal(False)
self.label = QtWidgets.QLabel(salary)
self.label.setGeometry(QtCore.QRect(-980, -230, 2020, 1340))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/salary.jpg"))
self.label.setObjectName("label")
self.c = QtWidgets.QLineEdit(salary)
self.c.setGeometry(QtCore.QRect(520, 378, 140, 25))
self.c.setStyleSheet("background-color: rgb(255, 255, 255);")
self.c.setObjectName("lineEdit_4")
self.a = QtWidgets.QLineEdit(salary)
self.a.setGeometry(QtCore.QRect(520, 230, 140, 25))
self.a.setStyleSheet("background-color: rgb(255, 255, 255);")
self.a.setObjectName("lineEdit_2")
self.label_4 = QtWidgets.QLabel(salary)
self.label_4.setGeometry(QtCore.QRect(130, 374, 180, 30))
self.label_4.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_4.setObjectName("label_4")
self.b = QtWidgets.QLineEdit(salary)
self.b.setGeometry(QtCore.QRect(520, 302, 140, 25))
self.b.setStyleSheet("background-color: rgb(255, 255, 255);")
self.b.setObjectName("lineEdit_3")
self.d = QtWidgets.QLineEdit(salary)
self.d.setGeometry(QtCore.QRect(520, 462, 140, 25))
self.d.setStyleSheet("background-color: rgb(255, 255, 255);")
self.d.setObjectName("lineEdit_5")
self.pushButton_3 = QtWidgets.QPushButton(salary)
self.pushButton_3.setGeometry(QtCore.QRect(370, 680, 110, 34))
self.pushButton_3.clicked.connect(self.Update)
self.pushButton_3.setStyleSheet("background-color: rgb(255, 255, 255);\n"
"")
self.pushButton_3.setObjectName("pushButton_3")
self.label_2 = QtWidgets.QLabel(salary)
self.label_2.setGeometry(QtCore.QRect(330, 30, 140, 60))
self.label_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_2.setFrameShape(QtWidgets.QFrame.WinPanel)
self.label_2.setObjectName("label_2")
self.label_6 = QtWidgets.QLabel(salary)
self.label_6.setGeometry(QtCore.QRect(130, 230, 120, 30))
self.label_6.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_6.setObjectName("label_6")
self.label_5 = QtWidgets.QLabel(salary)
self.label_5.setGeometry(QtCore.QRect(130, 460, 130, 30))
self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_5.setObjectName("label_5")
self.aa = QtWidgets.QLineEdit(salary)
self.aa.setGeometry(QtCore.QRect(520, 159, 140, 25))
self.aa.setStyleSheet("background-color: rgb(255, 255, 255);")
self.aa.setObjectName("lineEdit")
self.label_7 = QtWidgets.QLabel(salary)
self.label_7.setGeometry(QtCore.QRect(130, 540, 190, 30))
self.label_7.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_7.setObjectName("label_7")
self.label_3 = QtWidgets.QLabel(salary)
self.label_3.setGeometry(QtCore.QRect(130, 160, 190, 30))
self.label_3.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_3.setObjectName("label_3")
self.e = QtWidgets.QLineEdit(salary)
self.e.setGeometry(QtCore.QRect(520, 543, 140, 25))
self.e.setStyleSheet("background-color: rgb(255, 255, 255);")
self.e.setObjectName("lineEdit_6")
self.label_8 = QtWidgets.QLabel(salary)
self.label_8.setGeometry(QtCore.QRect(130, 300, 160, 30))
self.label_8.setStyleSheet("background-color: rgb(255, 255, 255);")
self.label_8.setObjectName("label_8")
self.pushButton = QtWidgets.QPushButton(salary)
self.pushButton.setGeometry(QtCore.QRect(70, 680, 112, 34))
self.pushButton.clicked.connect(Back)
self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton.setObjectName("pushButton")
self.pushButton_2 = QtWidgets.QPushButton(salary)
self.pushButton_2.setGeometry(QtCore.QRect(220, 680, 112, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("background-color: rgb(255, 255, 255);")
self.pushButton_2.setObjectName("pushButton_2")

self.retranslateUi(salary)
QtCore.QMetaObject.connectSlotsByName(salary)

def retranslateUi(self, salary):


_translate = QtCore.QCoreApplication.translate
salary.setWindowTitle(_translate("salary", "Salary "))
self.label_4.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Receptionist Salary</span></p></body></html>"))
self.pushButton_3.setText(_translate("salary", "Update"))
self.label_2.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:18pt; font-weight:600;\">Salary</span></p></body></html>"))
self.label_6.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Staff Salary</span></p></body></html>"))
self.label_5.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Labour Salary</span></p></body></html>"))
self.label_7.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Security Staff Salary</span></p></body></html>"))
self.label_3.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Management Salary</span></p></body></html>"))
self.label_8.setText(_translate("salary", "<html><head/><body><p><span
style=\" font-size:10pt;\">Employee Salary</span></p></body></html>"))
self.pushButton.setText(_translate("salary", "Back"))
self.pushButton_2.setText(_translate("salary", "Add"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Salary")
cursor=db.cursor()
try:
sql="""INSERT INTO
income(ManagerSalary,ReceptionistSalary,StaffSalary,EmployeeSalary,SecurityStaffSal
ary,Labour) VALUES(%s,%s,%s,%s,%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text(),self.e.
text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Salary")
cursor=db.cursor()
try:
sql="""update income set Labour=%s where ManagerSalary=%s"""
b=self.e.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","Salary")
cursor=db.cursor()
try:
sql="""delete from income where Labour=%s"""
Id=self.e.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_customer(object):
def setupUi(self, customer):
customer.setObjectName("customer")
customer.resize(950, 813)
customer.setStyleSheet("\n"
"background-color: rgb(255, 255, 255);")
self.label = QtWidgets.QLabel(customer)
self.label.setGeometry(QtCore.QRect(-510, -210, 1511, 1011))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/customer detail.jpg"))
self.label.setObjectName("label")
self.label_8 = QtWidgets.QLabel(customer)
self.label_8.setGeometry(QtCore.QRect(160, 590, 151, 30))
self.label_8.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.label_8.setObjectName("label_8")
self.label_5 = QtWidgets.QLabel(customer)
self.label_5.setGeometry(QtCore.QRect(160, 490, 90, 22))
self.label_5.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.label_5.setObjectName("label_5")
self.aa = QtWidgets.QLineEdit(customer)
self.aa.setGeometry(QtCore.QRect(610, 332, 149, 25))
self.aa.setStyleSheet("background-color: rgb(255, 255, 255);")
self.aa.setObjectName("lineEdit")
self.c = QtWidgets.QLineEdit(customer)
self.c.setGeometry(QtCore.QRect(610, 490, 146, 25))
self.c.setStyleSheet("background-color: rgb(255, 255, 255);")
self.c.setObjectName("lineEdit_4")
self.a = QtWidgets.QLineEdit(customer)
self.a.setGeometry(QtCore.QRect(610, 390, 151, 25))
self.a.setStyleSheet("background-color: rgb(255, 255, 255);")
self.a.setObjectName("lineEdit_2")
self.pushButton_2 = QtWidgets.QPushButton(customer)
self.pushButton_2.setGeometry(QtCore.QRect(440, 710, 112, 34))
self.pushButton_2.clicked.connect(self.Delete)
self.pushButton_2.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.pushButton_2.setObjectName("pushButton_2")
self.label_7 = QtWidgets.QLabel(customer)
self.label_7.setGeometry(QtCore.QRect(160, 440, 100, 25))
self.label_7.setStyleSheet("background-color: rgb(93, 180, 255);")
self.label_7.setObjectName("label_7")
self.label_2 = QtWidgets.QLabel(customer)
self.label_2.setGeometry(QtCore.QRect(270, 110, 391, 91))
self.label_2.setStyleSheet("background-color: rgb(93, 180, 255);")
self.label_2.setObjectName("label_2")
self.d = QtWidgets.QLineEdit(customer)
self.d.setGeometry(QtCore.QRect(610, 540, 148, 25))
self.d.setStyleSheet("background-color: rgb(255, 255, 255);")
self.d.setObjectName("lineEdit_5")
self.e = QtWidgets.QLineEdit(customer)
self.e.setGeometry(QtCore.QRect(610, 600, 148, 25))
self.e.setStyleSheet("background-color: rgb(255, 255, 255);")
self.e.setObjectName("lineEdit_6")
self.label_4 = QtWidgets.QLabel(customer)
self.label_4.setGeometry(QtCore.QRect(160, 390, 148, 24))
self.label_4.setStyleSheet("background-color: rgb(93, 180, 255);")
self.label_4.setObjectName("label_4")
self.label_6 = QtWidgets.QLabel(customer)
self.label_6.setGeometry(QtCore.QRect(160, 540, 120, 31))
self.label_6.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.label_6.setObjectName("label_6")
self.label_3 = QtWidgets.QLabel(customer)
self.label_3.setGeometry(QtCore.QRect(160, 340, 123, 24))
self.label_3.setStyleSheet("background-color: rgb(255, 203, 70);\n"
"background-color: rgb(93, 180, 255);")
self.label_3.setObjectName("label_3")
self.b = QtWidgets.QLineEdit(customer)
self.b.setGeometry(QtCore.QRect(610, 450, 151, 25))
self.b.setStyleSheet("background-color: rgb(255, 255, 255);")
self.b.setObjectName("lineEdit_3")
self.pushButton_3 = QtWidgets.QPushButton(customer)
self.pushButton_3.setGeometry(QtCore.QRect(170, 710, 112, 34))
self.pushButton_3.clicked.connect(self.Add)
self.pushButton_3.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton = QtWidgets.QPushButton(customer)
self.pushButton.setGeometry(QtCore.QRect(310, 710, 112, 34))
self.pushButton.clicked.connect(self.Update)
self.pushButton.setStyleSheet("background-color: rgb(93, 180, 255);\n"
"")
self.pushButton.setObjectName("pushButton")

self.retranslateUi(customer)
QtCore.QMetaObject.connectSlotsByName(customer)

def retranslateUi(self, customer):


_translate = QtCore.QCoreApplication.translate
customer.setWindowTitle(_translate("customer", "customer"))
self.label_8.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Check In Time</span></p></body></html>"))
self.label_5.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Charges</span></p></body></html>"))
self.pushButton_2.setText(_translate("customer", "delete"))
self.label_7.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Allotment</span></p><p><br/></p></body></html>"))
self.label_2.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:22pt; font-weight:600;\">Customer
Details</span></p></body></html>"))
self.label_4.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Room type</span></p></body></html>"))
self.label_6.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Customer ID</span></p></body></html>"))
self.label_3.setText(_translate("customer", "<html><head/><body><p><span
style=\" font-size:10pt;\">Room ID</span></p></body></html>"))
self.pushButton_3.setText(_translate("customer", "Add"))
self.pushButton.setText(_translate("customer", "Update"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","customer")
cursor=db.cursor()
try:
sql="""INSERT INTO
cust(CustomerId,CustomerName,RoomId,RoomType,Charges,Allotment,CheckInTime)
VALUES(%s,%s,%s,%s,%s,%s,%s)"""

inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text(),self.d.text(),self.e.
text(),self.f.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","customer")
cursor=db.cursor()
try:
sql="""update cust set CustomerName=%s where CustomerId=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","customer")
cursor=db.cursor()
try:
sql="""delete from cust where CustomerId=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_chef(object):
def setupUi(self, chef):
chef.setObjectName("chef")
chef.resize(890, 839)
self.label = QtWidgets.QLabel(chef)
self.label.setGeometry(QtCore.QRect(-580, -320, 2360, 1191))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/chef .jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(chef)
self.label_2.setGeometry(QtCore.QRect(340, 80, 230, 90))
self.label_2.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(chef)
self.label_3.setGeometry(QtCore.QRect(130, 280, 120, 30))
self.label_3.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(chef)
self.label_4.setGeometry(QtCore.QRect(130, 363, 110, 30))
self.label_4.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(chef)
self.label_5.setGeometry(QtCore.QRect(130, 452, 100, 32))
self.label_5.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.label_5.setObjectName("label_5")
self.pushButton_3 = QtWidgets.QPushButton(chef)
self.pushButton_3.setGeometry(QtCore.QRect(210, 740, 112, 34))
self.pushButton_3.clicked.connect(self.Update)
self.pushButton_3.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton = QtWidgets.QPushButton(chef)
self.pushButton.setGeometry(QtCore.QRect(340, 740, 112, 34))
self.pushButton.clicked.connect(self.Delete)
self.pushButton.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton.setObjectName("pushButton")
self.aa = QtWidgets.QLineEdit(chef)
self.aa.setGeometry(QtCore.QRect(580, 283, 150, 25))
self.aa.setObjectName("lineEdit")
self.a = QtWidgets.QLineEdit(chef)
self.a.setGeometry(QtCore.QRect(580, 368, 150, 25))
self.a.setObjectName("lineEdit_2")
self.b = QtWidgets.QLineEdit(chef)
self.b.setGeometry(QtCore.QRect(580, 457, 150, 25))
self.b.setObjectName("lineEdit_3")
self.pushButton_2 = QtWidgets.QPushButton(chef)
self.pushButton_2.setGeometry(QtCore.QRect(80, 740, 112, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("background-color: rgb(0, 0, 0);\n"
"color: rgb(255, 255, 255);")
self.pushButton_2.setObjectName("pushButton_2")

self.retranslateUi(chef)
QtCore.QMetaObject.connectSlotsByName(chef)

def retranslateUi(self, chef):


_translate = QtCore.QCoreApplication.translate
chef.setWindowTitle(_translate("chef", "chef"))
self.label_2.setText(_translate("chef", "<html><head/><body><p><span
style=\" font-size:20pt;\">Chef Details</span></p></body></html>"))
self.label_3.setText(_translate("chef", "<html><head/><body><p><span
style=\" font-size:10pt;\">Chef ID</span></p></body></html>"))
self.label_4.setText(_translate("chef", "<html><head/><body><p><span
style=\" font-size:10pt;\"> Chef Name</span></p></body></html>"))
self.label_5.setText(_translate("chef", "<html><head/><body><p><span
style=\" font-size:10pt;\">Contact</span></p></body></html>"))
self.pushButton_3.setText(_translate("chef", "Update"))
self.pushButton.setText(_translate("chef", "Delete"))
self.pushButton_2.setText(_translate("chef", "Add"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","chef")
cursor=db.cursor()
try:
sql="""INSERT INTO cook(ChefId,ChefName,Contact) VALUES(%s,%s,%s)"""
inp=(self.aa.text(),self.a.text(),self.b.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","chef")
cursor=db.cursor()
try:
sql="""update cook set ChefName=%s where ChefId=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","chef")
cursor=db.cursor()
try:
sql="""delete from cook where ChefId=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()

class Ui_inventory(object):
def setupUi(self, inventory):
inventory.setObjectName("inventory")
inventory.resize(948, 746)
self.label = QtWidgets.QLabel(inventory)
self.label.setGeometry(QtCore.QRect(-509, -120, 1831, 1141))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/inventory-management.jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(inventory)
self.label_2.setGeometry(QtCore.QRect(361, 60, 181, 101))
self.label_2.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(inventory)
self.label_3.setGeometry(QtCore.QRect(151, 250, 110, 30))
self.label_3.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(inventory)
self.label_4.setGeometry(QtCore.QRect(151, 330, 240, 31))
self.label_4.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(inventory)
self.label_5.setGeometry(QtCore.QRect(151, 400, 130, 30))
self.label_5.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(inventory)
self.label_6.setGeometry(QtCore.QRect(151, 480, 110, 30))
self.label_6.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.label_6.setObjectName("label_6")
self.aa = QtWidgets.QLineEdit(inventory)
self.aa.setGeometry(QtCore.QRect(601, 250, 140, 25))
self.aa.setObjectName("lineEdit")
self.a = QtWidgets.QLineEdit(inventory)
self.a.setGeometry(QtCore.QRect(601, 331, 140, 25))
self.a.setObjectName("lineEdit_2")
self.b = QtWidgets.QLineEdit(inventory)
self.b.setGeometry(QtCore.QRect(601, 401, 140, 25))
self.b.setObjectName("lineEdit_3")
self.c = QtWidgets.QLineEdit(inventory)
self.c.setGeometry(QtCore.QRect(601, 481, 140, 25))
self.c.setObjectName("lineEdit_4")
self.pushButton_3 = QtWidgets.QPushButton(inventory)
self.pushButton_3.setGeometry(QtCore.QRect(181, 620, 112, 34))
self.pushButton_3.clicked.connect(self.Add)
self.pushButton_3.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_2 = QtWidgets.QPushButton(inventory)
self.pushButton_2.setGeometry(QtCore.QRect(331, 620, 112, 34))
self.pushButton_2.clicked.connect(self.Update)
self.pushButton_2.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.pushButton_2.setObjectName("pushButton_2")
self.pushButton = QtWidgets.QPushButton(inventory)
self.pushButton.setGeometry(QtCore.QRect(480, 620, 112, 34))
self.pushButton.clicked.connect(self.Delete)
self.pushButton.setStyleSheet("\n"
"background-color: rgb(255, 250, 194);")
self.pushButton.setObjectName("pushButton")

self.retranslateUi(inventory)
QtCore.QMetaObject.connectSlotsByName(inventory)

def retranslateUi(self, inventory):


_translate = QtCore.QCoreApplication.translate
inventory.setWindowTitle(_translate("inventory", "Inventory"))
self.label_2.setText(_translate("inventory", "<html><head/><body><p><span
style=\" font-size:20pt;\">Inventory</span></p></body></html>"))
self.label_3.setText(_translate("inventory", "<html><head/><body><p><span
style=\" font-size:12pt;\">Furniture</span></p></body></html>"))
self.label_4.setText(_translate("inventory", "<html><head/><body><p><span
style=\" font-size:12pt;\">Electronic Accessories</span></p></body></html>"))
self.label_5.setText(_translate("inventory", "<html><head/><body><p><span
style=\" font-size:12pt;\">Food Stock</span></p></body></html>"))
self.label_6.setText(_translate("inventory", "<html><head/><body><p><span
style=\" font-size:12pt;\">Vehicals</span></p></body></html>"))
self.pushButton_3.setText(_translate("inventory", "Add"))
self.pushButton_2.setText(_translate("inventory", "Update"))
self.pushButton.setText(_translate("inventory", "Delete"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","inventory")
cursor=db.cursor()
try:
sql="""INSERT INTO
stock(Furniture,ElectronicAccesories,FoodStock,Vehicals) VALUES(%s,%s,%s,%s)"""
inp=(self.aa.text(),self.a.text(),self.b.text(),self.c.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')

def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","inventory")
cursor=db.cursor()
try:
sql="""update stock set ElectronicAccesories=%s"""
b=self.a.text()
put=(b)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","inventory")
cursor=db.cursor()
try:
sql="""delete from stock where Furniture=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()
class Ui_hotelatend(object):
def setupUi(self, hotelatend):
hotelatend.setObjectName("hotelatend")
hotelatend.resize(758, 536)
self.label = QtWidgets.QLabel(hotelatend)
self.label.setGeometry(QtCore.QRect(-210, -70, 1181, 681))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop store/Desktop/easy-
high-paying-jobs-1100834-TwoByOne.jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(hotelatend)
self.label_2.setGeometry(QtCore.QRect(190, 40, 320, 60))
self.label_2.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(hotelatend)
self.label_3.setGeometry(QtCore.QRect(130, 170, 68, 30))
self.label_3.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_3.setObjectName("label_3")
self.label_4 = QtWidgets.QLabel(hotelatend)
self.label_4.setGeometry(QtCore.QRect(130, 242, 70, 30))
self.label_4.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_4.setObjectName("label_4")
self.label_5 = QtWidgets.QLabel(hotelatend)
self.label_5.setGeometry(QtCore.QRect(130, 330, 91, 30))
self.label_5.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.label_5.setObjectName("label_5")
self.aa = QtWidgets.QLineEdit(hotelatend)
self.aa.setGeometry(QtCore.QRect(450, 170, 140, 25))
self.aa.setObjectName("lineEdit")
self.a = QtWidgets.QLineEdit(hotelatend)
self.a.setGeometry(QtCore.QRect(453, 244, 140, 25))
self.a.setObjectName("lineEdit_2")
self.b = QtWidgets.QLineEdit(hotelatend)
self.b.setGeometry(QtCore.QRect(455, 320, 140, 25))
self.b.setObjectName("lineEdit_3")
self.pushButton_2 = QtWidgets.QPushButton(hotelatend)
self.pushButton_2.setGeometry(QtCore.QRect(110, 430, 112, 34))
self.pushButton_2.clicked.connect(self.Add)
self.pushButton_2.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.pushButton_2.setObjectName("pushButton_2")
self.update = QtWidgets.QPushButton(hotelatend)
self.update.setGeometry(QtCore.QRect(270, 430, 112, 34))
self.update.clicked.connect(self.Update)
self.update.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.update.setObjectName("update")
self.pushButton = QtWidgets.QPushButton(hotelatend)
self.pushButton.setGeometry(QtCore.QRect(430, 430, 112, 34))
self.pushButton.clicked.connect(self.Delete)
self.pushButton.setStyleSheet("color: rgb(255, 255, 255);\n"
"background-color: rgb(0, 0, 0);")
self.pushButton.setObjectName("pushButton")

self.retranslateUi(hotelatend)
QtCore.QMetaObject.connectSlotsByName(hotelatend)

def retranslateUi(self, hotelatend):


_translate = QtCore.QCoreApplication.translate
hotelatend.setWindowTitle(_translate("hotelatend", "Hotel attendent"))
self.label_2.setText(_translate("hotelatend", "<html><head/><body><p><span
style=\" font-size:22pt; color:#ffffff;\">Hotel
Attendant</span></p></body></html>"))
self.label_3.setText(_translate("hotelatend", "<html><head/><body><p><span
style=\" font-size:11pt;\">ID</span></p></body></html>"))
self.label_4.setText(_translate("hotelatend", "<html><head/><body><p><span
style=\" font-size:11pt;\">Name</span></p></body></html>"))
self.label_5.setText(_translate("hotelatend", "<html><head/><body><p><span
style=\" font-size:11pt;\">Contact</span></p></body></html>"))
self.pushButton_2.setText(_translate("hotelatend", "Add"))
self.update.setText(_translate("hotelatend", "Update"))
self.pushButton.setText(_translate("hotelatend", "Delete"))

def Add(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","hotelAttendant")
cursor=db.cursor()
try:
sql="""INSERT INTO attend(Id,Name,Contact) VALUES(%s,%s,%s)"""
inp=(self.aa.text(),self.a.text(),self.b.text())
cursor.execute(sql,inp)
db.commit()
print('done')
except:
db.rollback()
print('Error')
def Update(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","hotelAttendant")
cursor=db.cursor()
try:
sql="""update attend set Name=%s where Id=%s"""
b=self.a.text()
c=self.aa.text()
put=(b,c)
cursor.execute(sql,put)
db.commit()
print('done UPDATE')
except:
db.rollback()
print('Error')
db.close()

def Delete(self):
import MySQLdb
db=MySQLdb.connect("localhost","root","user123","hotelAttendant")
cursor=db.cursor()
try:
sql="""delete from attend where Id=%s"""
Id=self.aa.text()
cursor.execute(sql,Id)
db.commit()
print('done DELETE')
except:
db.rollback()
print('Error')
db.close()
class Ui_aboutus(object):
def setupUi(self, aboutus):
aboutus.setObjectName("aboutus")
aboutus.resize(1071, 704)
self.label = QtWidgets.QLabel(aboutus)
self.label.setGeometry(QtCore.QRect(-310, -150, 2271, 891))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("C:/Users/The laptop
store/Desktop/hotel-in-.jpg"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(aboutus)
self.label_2.setGeometry(QtCore.QRect(60, 90, 191, 101))
self.label_2.setStyleSheet("color: rgb(255, 255, 255);\n"
"color: rgb(205, 246, 255);")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(aboutus)
self.label_3.setGeometry(QtCore.QRect(240, 240, 641, 271))
self.label_3.setStyleSheet("color: rgb(85, 170, 255);\n"
"color: rgb(255, 255, 255);")
self.label_3.setObjectName("label_3")

self.retranslateUi(aboutus)
QtCore.QMetaObject.connectSlotsByName(aboutus)

def retranslateUi(self, aboutus):


_translate = QtCore.QCoreApplication.translate
aboutus.setWindowTitle(_translate("aboutus", "Dialog"))
self.label_2.setText(_translate("aboutus", "<html><head/><body><p><span
style=\" font-size:22pt;\">About Us</span></p></body></html>"))
self.label_3.setText(_translate("aboutus", "<!DOCTYPE HTML
PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-
html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8pt; font-
weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-
right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:16pt;
font-weight:600;\">This is a Project Hotel Management </span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-
right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:16pt;
font-weight:600;\">System</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-
right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-
family:\'Bliss Regular,Helvetica Neue,Helvetica,Arial,sans-serif\'; font-size:16pt;
color:#333f48; background-color:#ffffff;\">this comprises on application of
knowledge,</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-
right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-
family:\'Bliss Regular,Helvetica Neue,Helvetica,Arial,sans-serif\'; font-size:16pt;
color:#333f48; background-color:#ffffff;\">skills, tools, and techniques to project
</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-
right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-
family:\'Bliss Regular,Helvetica Neue,Helvetica,Arial,sans-serif\'; font-size:16pt;
color:#333f48; background-color:#ffffff;\">activities to meet the project
requirements.</span></p></body></html>"))

if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Hotel_management_system = QtWidgets.QMainWindow()
ui = Ui_Hotel_management_system()
ui.setupUi(Hotel_management_system)
Hotel_management_system.show()
sys.exit(app.exec_())

Вам также может понравиться