c12 Cs Websupport Project Foodorderingsystem
c12 Cs Websupport Project Foodorderingsystem
c12 Cs Websupport Project Foodorderingsystem
PROGRAM
import os
import platform
import mysql.connector
passwd ="",database="food")
mycursor=mydb.cursor()
def Customer():
L=[]
L.append(c_id)
L.append(name)
L.append(cphone)
L.append(payment)
L.append(pstatus)
L.append(email)
L.append(OrderF_id)
L.append(date)
cust=(L)
mycursor.execute(sql,cust)
mydb.commit()
def Employee():
L=[]
Emp_id=int(input("Enter the Employee ID: "))
L.append(Emp_id)
L.append(ename)
L.append(emp_g)
L.append(eage)
L.append(emp_phone)
L.append(pwd)
EMP=(L)
mycursor.execute(sql,EMP)
mydb.commit()
def Food():
L=[]
L.append(Food_id)
L.append(Foodname)
L.append(Food_size)
L.append(price)
Food=(L)
mycursor.execute(sql,Food)
mydb.commit()
def OrderFood():
L=[]
L.append(C_id)
L.append(Emp_id)
L.append(Food_id)
L.append(Food_qty)
L.append(Total_price)
OrderFood=(L)
mycursor.execute(sql,OrderFood)
mydb.commit()
def View():
print("1. Employee")
print("2. Customer")
print("3. Food")
if ch==1:
rl=(s,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==2:
rl=(s,)
sql="select * from Customer where cname=%s"
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==3:
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==4:
rl=(s,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
def MenuSet():
try:
except ValueError:
else:
print("\n")
if (userInput==1):
Employee()
elif (userInput==2):
Customer()
elif (userInput==3):
Food()
elif (userInput==4):
OrderFood()
elif (userInput==5):
View()
else:
def runAgain():
while runAgn.lower()=='y':
if(platform.system()=="Windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
MenuSet()
exit()
MenuSet()
runAgain()