Professional Documents
Culture Documents
Button(root1,text='Transaction',command=transaction_close,width=25,bg='teal',font='
arial 12 bold').place(x=200,y=300)
Button(root1,text='Log out',command=close,width=25,bg='teal',font='arial 12
bold').place(x=200,y=350)
root1.mainloop()
def main():
root =Tk()
root.title('Online Banking System for KV2 Armapur')
root.geometry('650x500+300+100')
root.configure(bg='teal')
Label(root,text='Easy Money Transfer System',bg='teal',fg='yellow',font='arial
18 bold italic').place(x=120,y=20)
Label(root,text='User ID',bg='teal',font='arial 14').place(x=20,y=200)
Label(root,text='Password.',bg='teal',font='arial 14').place(x=20,y=240)
v1=StringVar()
v2=StringVar()
e1=Entry(root,textvariable=v1,width=20,font='arial 12').place(x=200,y=200)
e2=Entry(root,textvariable=v2,show='*',width=20,font='arial
12').place(x=200,y=240)
def close():
root.destroy()
def login():
global uid
uid=v1.get()
pw=v2.get()
mycur.execute('select * from customer where userid=%s',(uid,))
rec=mycur.fetchall()
global user
for i in rec:
user=i[0]
password=i[1]
if uid==user and pw==password:
close()
options()
else:
messagebox.showinfo('Sorry','Try again')
def register_close():
close()
register()
def clear():
v1.set('')
v2.set('')
Button(root,text='New User? SIGN
UP',command=register_close,bg='teal',font='arial 12 bold italic').place(x=10,y=300)
Button(root,text='Log in',command=login,width=8,bg='teal',font='arial 12
bold').place(x=200,y=300)
Button(root,text='Clear',command=clear,width=8,bg='teal',font='arial 12
bold').place(x=300,y=300)
Button(root,text='Close',command=close,width=8,bg='teal',font='arial 12
bold').place(x=400,y=300)
Label(root,text='Note:\n Its educational project, Used for Teaching
Only',bg='teal',fg='yellow',font='arial 10 bold
italic',justify=LEFT).place(x=10,y=420)
Label(root,text='KV NO.2 ARMAPUR KANPUR',bg='teal',fg='yellow',font='arial 12
bold italic',justify=RIGHT).place(x=10,y=350)
root.mainloop()
if __name__== main():
main()