def booked(self):
    if (self.boarding_Combo.get() == 'Select Boarding'):
        messagebox.showerror('Unknown Boarding', ' Please select your Boarding')
        return
    elif (self.des_Combo.get() == 'Select Destination'):
        messagebox.showerror('Unknown Destination', 'Please Select your Destination')
        return
    elif (self.no_of_Adult.get() == 'Select Adult(s)'):
        messagebox.showerror('No Adult Selected', ' Please select Adult(s)')
        return
    elif (self.no_of_Child.get() == 'Select Child(s)'):
        messagebox.showerror('No Child Selected', ' Please select Child(s)')
        return
    elif (self.boarding_Combo.get() == self.des_Combo.get()):
        messagebox.showerror('Error', 'Boarding and Destination cannot be same!')
        return
    qtotal = messagebox.askyesno('Total Cost Check', ' Do you want to check total cost')
    if (qtotal > 0):
        messagebox.showinfo('Total Cost Check', 'Check total fare by clicking Total Button')
        return
    qPrint = messagebox.askyesno('Confirmation', 'Ticket Booked!\n\n Print Ticket ?')
    if (qPrint > 0):
        messagebox.showinfo('Booked', ((((((((((('Ticket Booked\n\n' + 'Printing Ticket\n\n ') + self.boarding_Combo.get()) + '   To   ') + self.des_Combo.get()) + '\n\n') + ' For  ') + self.no_of_Adult.get()) + ' Adult(s)') + '  and  ') + self.no_of_Child.get()) + ' Child(s)'))
        global na
        na = self.no_of_Adult.get()
        global nc
        nc = self.no_of_Child.get()
        global bb
        bb = "'{}'".format(self.boarding_Combo.get())
        global dc
        dc = "'{}'".format(self.des_Combo.get())
        self.from2.configure(text='')
        self.to2.configure(text='')
        self.no_of_Adults2.configure(text='')
        self.no_of_Child2.configure(text='')
        self.tCost2.configure(text='')
        self.no_of_Adult.set('Select Adult(s)')
        self.no_of_Child.set('Select Child(s)')
        self.boarding_Combo.set('Select Boarding')
        self.des_Combo.set('Select Destination')
    Date1 = StringVar()
    now = datetime.datetime.now()
    Date1.set(now.strftime('%d-%m-%Y  %I:%M:%S:%p'))
    self.lbltiming2.configure(textvariable=Date1)
    ticket_num = 1
    ticket_nu = str(ticket_num)
    f = open('Tickets.txt', 'a')
    f.write(ticket_nu)
    f.close()
    with open('Tickets.txt') as infile:
        characters = 0
        for (lineno, line) in enumerate(infile, 1):
            wordslist = line.split()
            characters += sum((len(word) for word in wordslist))
    ticketno = StringVar()
    ticket_number = characters
    ticketno.set(ticket_number)
    self.tno.configure(textvariable=ticketno)
def booked(self):
    if (self.boarding_Combo.get() == 'Select Boarding'):
        messagebox.showerror('Unknown Boarding', ' Please select your Boarding')
        return
    elif (self.des_Combo.get() == 'Select Destination'):
        messagebox.showerror('Unknown Destination', 'Please Select your Destination')
        return
    elif (self.no_of_Adult.get() == 'Select Adult(s)'):
        messagebox.showerror('No Adult Selected', ' Please select Adult(s)')
        return
    elif (self.no_of_Child.get() == 'Select Child(s)'):
        messagebox.showerror('No Child Selected', ' Please select Child(s)')
        return
    elif (self.boarding_Combo.get() == self.des_Combo.get()):
        messagebox.showerror('Error', 'Boarding and Destination cannot be same!')
        return
    qtotal = messagebox.askyesno('Total Cost Check', ' Do you want to check total cost')
    if (qtotal > 0):
        messagebox.showinfo('Total Cost Check', 'Check total fare by clicking Total Button')
        return
    qPrint = messagebox.askyesno('Confirmation', 'Ticket Booked!\n\n Print Ticket ?')
    if (qPrint > 0):
        messagebox.showinfo('Booked', ((((((((((('Ticket Booked\n\n' + 'Printing Ticket\n\n ') + self.boarding_Combo.get()) + '   To   ') + self.des_Combo.get()) + '\n\n') + ' For  ') + self.no_of_Adult.get()) + ' Adult(s)') + '  and  ') + self.no_of_Child.get()) + ' Child(s)'))
        global na
        na = self.no_of_Adult.get()
        global nc
        nc = self.no_of_Child.get()
        global bb
        bb = "'{}'".format(self.boarding_Combo.get())
        global dc
        dc = "'{}'".format(self.des_Combo.get())
        self.from2.configure(text=)
        self.to2.configure(text=)
        self.no_of_Adults2.configure(text=)
        self.no_of_Child2.configure(text=)
        self.tCost2.configure(text=)
        self.no_of_Adult.set('Select Adult(s)')
        self.no_of_Child.set('Select Child(s)')
        self.boarding_Combo.set('Select Boarding')
        self.des_Combo.set('Select Destination')
    Date1 = StringVar()
    now = datetime.datetime.now()
    Date1.set(now.strftime('%d-%m-%Y  %I:%M:%S:%p'))
    self.lbltiming2.configure(textvariable=Date1)
    ticket_num = 1
    ticket_nu = str(ticket_num)
    f = open('Tickets.txt', 'a')
    f.write(ticket_nu)
    f.close()
    with open('Tickets.txt') as infile:
        characters = 0
        for (lineno, line) in enumerate(infile, 1):
            wordslist = line.split()
            characters += sum((len(word) for word in wordslist))
    ticketno = StringVar()
    ticket_number = characters
    ticketno.set(ticket_number)
    self.tno.configure(textvariable=ticketno)