0% found this document useful (0 votes)
17 views35 pages

JF

Uploaded by

carojeni07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views35 pages

JF

Uploaded by

carojeni07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

INDEX

TOPIC
S.N
O
1 INTRODUCTION
2 FUTURE ENHANCEMENT
3 PURPOSE OF PROJECT
4 INFORMATION FOOD SYSTEM
5 DESIGN/IMPLEMENTATION
6 SOURCE CODE
7 OUTPUT
8 REFERENCE

9 CONCLUSION
10 BIBLIOGRAPHY
.
FOOD ORDERING MANAGEMENT
SOURCE CODE:

import os
import platform
import mysql.connector
import pandas as pd
mydb=mysql.connector.connect(host="localhost",user="ro
ot",passwd="Admin@321",database="foodspot")
mycursor=mydb.cursor()
print("***************************************************
*************")
print()
print("************WELCOME TO OUR FOODSPOT
APP******************")
print()
print("****************PLACE TO TASTE THE REAL
FOOD************”)
print()
def customer():
l=[]
c_id=int(input("enter the customer id number:"))
l.append(c_id)
name=input("enter the customer name:")
l.append(name)
cphone=int(input("enter customer phone number:"))
l.append(cphone)
payment=int(input("enter payment method((1)credit
card/(2)debit card:)"))
l.append(payment)
pstatus=input("enter the payment status:")
l.append(pstatus)
email=input("enter the email id")
l.append(email)
orderid=input("enter orderid")
l.append(orderid)
cust=(l)
sql="insert into
customers(c_id,c_name,c_phone,c_payment,paid_status,c_e
mail,order_id) values({},'{}',{},{},'{}','{}',
{})".format(c_id,name,cphone,pay ment,pstatus,email,orderid )
mycursor.execute(sql)
mydb.commit()
print("Customer details inserted successfully")
#customer table:- c_id(pk c_phonenum
payment_method (cash/credit card)
payment_status(paid/unpaid) email emp_id (fk)
orderF_id(fk) date

def employee():
l=[]
e_id=int(input("enter the employee id:"))
l.append(e_id)
ename=input("enter the employee name:")
l.append(ename)
eage=int(input(" enter employee age:"))
l.append(eage)
e_phone=input("enter employee phone number")
l.append(e_phone)

doj=input("enter the date of join:")


l.append(doj)
e_sal=int(input("enter employee salary"))
l.append(e_sal)
emp=(l)
sql="insert into
employee(E_id,E_name,E_age,E_phone,E_doj,E_salary)
values({},'{}',{},'{}','{}',{})".format(e_id,ename,eage,e_phon
e,doj,e_sal)
mycursor.execute(sql)
mydb.commit()
print('Inserted successfully')

def food():
l=[]
food_id=int(input("enter the food id:"))
l.append(food_id)
food_name=input("enter the food name:")
l.append(food_name)
price=int(input("enter the food price:"))
l.append(price)
food_size=int(input("enter the food
size:")) l.append(food_size)
food_type=input("enter food type:")
l.append(food_type)
delivery_price=int(input("enter delivery price:"))
l.append(delivery_price)
food=(l)

sql="insert into
food(Food_id,Food_name,Price,Food_size,food_type,delive
ry_price) values({},'{}',{},{},'{}',
{})".format(food_id,food_name,price,f
ood_size,food_type,delivery_price)
mycursor.execute(sql)
print("inserted successfully")
def orderfood():
l=[]
order_id=int(input("enter the food order id:"))
l.append(order_id)
c_id=input("enter customer id:")
l.append(c_id)
emp_id=input("enter employee id:")
l.append(emp_id)
food_id=int(input("enter food id:"))
l.append(food_id)
food_qty=int(input("enter qty:"))
l.append(food_qty)
Total_price=int(input("Enter Total_price:"))
l.append(Total_price)
OrderFood=(l)
sql="insert into
OrderFood(Order_id,Customer_id,Employee_id,Food_id,Fo
od_quantity,Total_price) values ({},'{}','{}',{},{},
{})".format(order_id,c_id,emp_id,food_id,foo d_qty,Total_price)
mycursor.execute(sql)
mydb.commit()
print("inserted successfully")
#OrderF _id (PK) C_id (FK)
Food_qtyTotal_price,Employee_id (FK) Food_id (FK)
def View():
print("Select the search criteria:")
print("1. Employee")
print("2. Customer")
print("3. Food")
print ("4. Order Food")
ch=int(input("Enter the choice 1 to 4 : "))
if ch==1:
s=int(input("enter Employee ID:"))
r1=(s,)
sql="select * from Employee where e_id={}".format(s)
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==2 :
s=input("Enter Customer Name : ")
r1=(s,)
sql="select * from Customers where
c_name='{}'".format(s)
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==3:
sql="select * from Food"
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==4 :
s=int(input("Enter Food ID : "))
r1=(s,)
sql="select * from orderfood where
food_id={}".format(s)
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
print ("The Food details are as follows : ")
print ("(Customer ID, Food Name, quantity, Cost )")
def feedeposit():
l=[]
roll=int(input("enter the roll number:"))
l.append(roll)
feedeposit=int(input("enter the fee to be deposited:"))
l.append(feedeposit)
month=input("enter month of fee:")
l.append(month)
fee=(l)
sql="insert into
feedeposit(roll,feedeposit,month)values({},
{},'{}')".format( roll,feedeposit,month)
mycursor.execute(sql)
mydb.commit()
def menuset():
print("enter 1: To add employee")
print("enter 2: To add customers
details") print("enter 3: To add food
details") print("enter 4: For food order")
print("enter 5: For feedeposit")
print("enter 6: To view food booking")
try:
userinput=int(input("please select an above option:"))
except ValueError:
exit("\nHy! That's not a number")
else:
print("\n")
if(userinput==1):
employee()
elif(userinput==2):
customer()
elif(userinput==3):
food()
elif(userinput==4):
orderfood()
elif(userinput==5):
feedeposit()
elif(userinput==6):
View()
else:
print("enter correct choice...")

def runagain():
runagn=input("\nwant to run again (Y/N)")
while runagn.lower()=='y':
if(platform.system()=="windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
menuset()
runagn=input("\nwant to run again (y/n)")
print("thank you......order again")
print("just one small positive thought in the morning
can change your whole day")
menuset()
runagain()

You might also like