Hotel Management by Abbha Jain
Hotel Management by Abbha Jain
Hotel Management by Abbha Jain
varchar(10));
import os
import platform
import mysql.connector
import pandas as pd
import datetime
global z
mydb = mysql.connector.connect(user='root', password='abha',
host='localhost',
database='hotel')
mycursor=mydb.cursor()
def registercust():
L=[]
name=input("enter name:")
L.append(name)
addr=input("enter address:")
L.append(addr)
indate=input("enter check in date:")
L.append(indate)
outdate=input("enter check out date:")
L.append(outdate)
cust=(L)
sql="insert into custdata(name,addr,indate,outdate)values(%s,%s,%s,%s)"
mycursor.execute(sql,cust)
mydb.commit()
def roomtypeview():
print("Do yoy want to see room type available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from roomtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def roomrent():
print ("We have the following rooms for you:-")
print ("1. type A---->rs 1000 PN\-")
print ("2. type B---->rs 2000 PN\-")
print ("3. type C---->rs 3000 PN\-")
print ("4. type D---->rs 4000 PN\-")
x=int(input("Enter Your Choice Please->"))
n=int(input("For How Many Nights Did You Stay:"))
if(x==1):
print ("you have opted room type A")
s=1000*n
elif (x==2):
print ("you have opted room type B")
s=2000*n
elif (x==3):
print ("you have opted room type C")
s=3000*n
elif (x==4):
print ("you have opted room type D")
s=4000*n
else:
print ("please choose a room")
print ("your room rent is =",s,"\n")
def restaurentmenuview():
print("Do yoy want to see mebu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def orderitem():
global s
print("Do yoy want to see mebu available : Enter 1 for yes :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurent"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def Menuset():
print("enter 1: To enter customer data")
print("enter 2 : To view roomtype")
print("enter 3 : for calculating room bill")
print("enter 4 : for viewing restaurent menu")
print("enter 5 : for restaurent bill")
print("enter 6 :for laundary bill")
print("enter 7 : for complete bill")
print("enter 8 : for exit:")
try:
userinput=int(input("pleaseselect an above option:"))
except ValueError:
exit("\n hi thats not a number")