def VPage(): root.destroy() if vclient.validate(username,password)=="yes": VotingPage.main() else: root.messagebox.showinfo('ERROR' , 'Either username or password is invalid. Please try again.')
def newpg(): un = username.get() pw = password.get() if vclient.validate(un, pw) == "yes": root.destroy() VotingPage() else: print("error")
def VPage(): user = e.get() pas = f.get() print(user, pas) if vclient.validate(user, pas) == "yes": root.destroy() VotingPage.main() else: messagebox.showinfo( "ERROR", "Either username or password is invalid. Please try again.")
def VPage(): user = e.get() pas = f.get() #print(user, pas) if vclient.validate(user, pas) == "yes": root1.destroy() #a_server.getuser(user) #VotingPage.main() def sel1(): def home(): root3.destroy() main() a_server.getuser(user) root2.destroy() root3 = Tk() root3.title("SUBMIT") root3.config(background='purple4') root3.geometry("1600x8000") # print(var.get(),"sfvfsvfv") selection = "You Have Voted For " + var.get() messenger_client.my_vote =var.get() usernam= str(var.get()) label3 = Label(root3, bg='purple4', font=('arial', 16, 'bold')) label3.config(text=selection, bg='purple4') label3.pack() label4 = Label(root3, bg='purple4', font=('arial', 16, 'bold'), text="Thanks for Voting ") label4.pack() homebutton = Button(root3, text="Go To Home Page", activebackground="LightBlue", relief="raised", font=('arial', 16, 'bold'), bd=10, bg="MediumPurple1",command=home) homebutton.pack(side=LEFT) #receiver.start() sender = messenger_client.Sender(server_host, usernam, server_port, my_host, my_port) sender.start() #sender.keepRunning= False #messenger_client.Sender.run() stmt2 ="UPDATE c_party_info SET votes = (votes+1) where party_name = :n" cursor_c_party_info.execute(stmt2,{'n':usernam}) con.commit() #confirmbutton = Button(root2, text="Confirm", activebackground="LightBlue", relief="raised", # font=('arial', 16, 'bold'), bd=10, bg="MediumPurple1") #confirmbutton.pack(side=LEFT) root2 = Tk() root2.title("VOTING") root2.config(background='purple4') root2.geometry("1600x8000") var = StringVar() r1 = Radiobutton(root2, text="Bhartiya Janta Party ", font=('arial', 20, 'bold'), variable=var, value="BJP", bg='purple4', command=sel1) r1.place(x=500,y=200) r2 = Radiobutton(root2, text="Aam Aadmi Party", font=('arial', 20, 'bold'), variable=var, value="AAP", bg='purple4', command=sel1) r2.place(x=500,y=300) r3 = Radiobutton(root2, text="Congress", font=('arial', 20, 'bold'), variable=var, value="CONGRESS", bg='purple4', command=sel1) r3.place(x=500,y=400) r4 = Radiobutton(root2, text="Shivsena", font=('arial', 20, 'bold'), variable=var, value="SHIVSENA", bg='purple4', command=sel1) r4.place(x=500,y=500) r5 = Radiobutton(root2, text="MNS", font=('arial', 20, 'bold'), variable=var, value="MNS", bg='purple4', command=sel1) r5.place(x=500,y=600) root2.mainloop() else: messagebox.showinfo("ERROR", "Either username or password is invalid. Please try again.")