-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlight_Booking_Search.py
More file actions
181 lines (119 loc) · 6.57 KB
/
Flight_Booking_Search.py
File metadata and controls
181 lines (119 loc) · 6.57 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
from tkinter import*
from tkinter.ttk import Combobox
from tkinter import messagebox
from PIL import ImageTk, Image
import sqlite3
import mysql.connector
root=Tk()
Wwidth= root.winfo_screenwidth()
Wheight= root.winfo_screenheight()
root.geometry("%dx%d+%d+%d" % (Wwidth, Wheight,0,0))
root.config(bg="white")
root.title("Flight Booking")
def btnAsSearch_clik():
s=SourceCitychoosen.get()
d=DestinationCitychoosen.get()
if s=='New Delhi' and d=='Mumbai':
root.destroy()
import newdelhimumbai
if s=='Mumbai' and d=='New Delhi':
root.destroy()
import mumbainewdelhi
if s=='Chennai' and d=='Kolkata':
root.destroy()
import chennaikolkata
if s=='Kolkata' and d=='Chennai':
root.destroy()
import kolkatachennai
if s=='Kolkata' and d=='Mumbai':
root.destroy()
import kolkatamumbai
if s=='Mumbai' and d=='Kolkata':
root.destroy()
import mumbaikolkata
if s=='Chennai' and d=='Mumbai':
root.destroy()
import chennaimumbai
if s=='Mumbai' and d=='Chennai':
root.destroy()
import mumbaichennai
if s=='Chennai' and d=='Newdelhi':
root.destroy()
import chennainewdelhi
if s=='New Delhi' and d=='Chennai':
root.destroy()
import newdelhichennai
if s=='Kolkata' and d=='New Delhi':
root.destroy()
import kolkatanewdelhi
if s=='New Delhi' and d=='Kolkata':
root.destroy()
import newdelhikolkata
if s=='Hyderabad' and d=='Ahmedabad':
root.destroy()
import hyderabadahmedabad
if s=='Ahmedabad' and d=='Hyderabad':
root.destroy()
import ahmedabadhyderabad
if s=='Guwahati' and d=='Amritsar':
root.destroy()
import guwahatiamritsar
if s=='Amritsar' and d=='Guwahati':
root.destroy()
import amritsarguwahati
if s=='Srinagar' and d=='Jaipur':
root.destroy()
import srinagarjaipur
if s=='Jaipur' and d=='Srinagar':
root.destroy()
import jaipursrinagar
n=StringVar()
n1=StringVar()
lbl_heading=Label(root, text="FLIGHT BOOKINGS",fg="black",bg="light green",font=("Times New Roman",25),relief="ridge",pady=10,border=10).pack(fill='x')
canvas = Canvas(root, width = 4050, height = 272)
canvas.pack()
img = ImageTk.PhotoImage(Image.open("D:/Anuska/Travel2021/Daily_Travel_Booking/Pictures/FlightBookingBg.jpg"))
canvas.create_image(0, 0, anchor=NW, image=img)
label_SourceCity=Label(root, text="SOURCE CITY:",fg="Black", bg="white", font=("Times New Roman", 18, "bold"))
label_SourceCity.place(x=140, y=450)
SourceCitychoosen=Combobox(root, width = 15, textvariable = n)
SourceCitychoosen['values'] = ('New Delhi', 'Mumbai','Kolkata','Chennai','Srinagar','Jaipur','Amritsar','Guwahati','Hyderabad','Ahmedabad')
SourceCitychoosen.place(x=340, y=455)
SourceCitychoosen.current()
label_DestinationCity=Label(root, text="DESTINATION CITY:",fg="Black", bg="white", font=("Times New Roman", 18, "bold"))
label_DestinationCity.place(x=580, y=450)
DestinationCitychoosen=Combobox(root, width = 15, textvariable = n1)
DestinationCitychoosen['values'] = ('New Delhi', 'Mumbai','Kolkata','Chennai','Srinagar','Jaipur','Amritsar','Guwahati','Hyderabad','Ahmedabad')
DestinationCitychoosen.place(x=840, y=455)
DestinationCitychoosen.current()
Button(root, text="SEARCH", width=12,height=1, bg='black', fg='white', font=("calibri 15"),command=btnAsSearch_clik).place(x=1050, y=450)
Home_Frame=Frame(root,bd=3, relief=RIDGE, bg="cadet blue")
Home_Frame.place(x=0, y=350, width=1354, height=80)
lbl1=Label(Home_Frame, text="Our software is centered on making travel simple and has been designed to let you look for cheap packages and to complete your bookings in just a few clicks. We are known for providing \n the best travel deals to travelers.We can satisfy all your travel needs.Book your flights here at a cost-effective price.So,why go anywhere else? Visit us for a memorable travel experience \n in your budget.Travel India your way and get ready for a hassle-free experience with us!", bg="cadet blue",fg="black",font=("Arial 12 italic"))
lbl1.grid(row=0, column=0, padx=0,pady=0, sticky="w")
root.mainloop()
n=StringVar()
n1=StringVar()
lbl_heading=Label(root, text="FLIGHT BOOKINGS",fg="black",bg="light green",font=("Times New Roman",25),relief="ridge",pady=10,border=10).pack(fill='x')
canvas = Canvas(root, width = 4050, height = 272)
canvas.pack()
img = ImageTk.PhotoImage(Image.open("D:/Anuska/Travel2021/Daily_Travel_Booking/Pictures/FlightBookingBg.jpg"))
canvas.create_image(0, 0, anchor=NW, image=img)
label_SourceCity=Label(root, text="SOURCE CITY:",fg="Black", bg="white", font=("Times New Roman", 18, "bold"))
label_SourceCity.place(x=140, y=450)
SourceCitychoosen=Combobox(root, width = 15, textvariable = n)
SourceCitychoosen['values'] = ('New Delhi', 'Mumbai','Kolkata','Chennai','Jaipur','Amritsar','Guwahati','Hyderabad','Ahmedabad')
SourceCitychoosen.place(x=340, y=455)
SourceCitychoosen.current()
label_DestinationCity=Label(root, text="DESTINATION CITY:",fg="Black", bg="white", font=("Times New Roman", 18, "bold"))
label_DestinationCity.place(x=580, y=450)
DestinationCitychoosen=Combobox(root, width = 15, textvariable = n1)
DestinationCitychoosen['values'] = ('New Delhi', 'Mumbai','Kolkata','Chennai','Jaipur','Amritsar','Guwahati','Hyderabad','Ahmedabad')
DestinationCitychoosen.place(x=840, y=455)
DestinationCitychoosen.current()
Button(root, text="SEARCH", width=12,height=1, bg='black', fg='white', font=("calibri 15"),command=btnAsSearch_clik).place(x=1050, y=450)
Home_Frame=Frame(root,bd=3, relief=RIDGE, bg="cadet blue")
Home_Frame.place(x=0, y=350, width=1354, height=80)
lbl1=Label(Home_Frame, text="Our software is centered on making travel simple and has been designed to let you look for cheap packages and to complete your bookings in just a few clicks. We are known for providing \n the best travel deals to travelers.We can satisfy all your travel needs.Book your flights here at a cost-effectiveprice.So,why go anywhere else? Visit us for a memorable travel experience \n in your budget.Travel India your way and get ready for a hassle-free experience with us!", bg="cadet blue",fg="black",font=("Arial 12 italic"))
lbl1.grid(row=0, column=0, padx=0,pady=0, sticky="w")
root.mainloop()