Python code:(copy the code)
# !/python36
from tkinter import*
import tkinter
import webbrowser
import sqlite3
root=Tk()
root.geometry("1600x800+0+0")
root.title("MONEY TRANSFER AND EXCHANGE")
#---------------------------Index Page Start-------------------------------------#
w = Label(root,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",height=2,width=1000,font="Arial 20 bold").pack(side=TOP)
canvas = Canvas(root, width = 600, height = 600)
canvas.pack()
img = PhotoImage(file="image/3.png")
canvas.create_image(5,5, anchor=NW, image=img)
#---------------------------Index Page End-------------------------------------#
#---------------------------Menu Bar Start-------------------------------------#
def countryname():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="blue",fg="white",font="Arial 10 bold").pack(side=TOP)
Google=webbrowser.open_new(r"http://WWW.countries-ofthe-world.com")
Google="Google"
link=Label(filewin,text=(Google),fg="blue",cursor="hand2")
link.pack()
# Home Menu Start
menubar = Menu(root)
Adminmenu = Menu(menubar, tearoff=0)
Adminmenu.add_command(label="COUNTRY MONEY NAME",command=countryname)
Adminmenu.add_command(label="CURRENCY CALCULATOR")
Adminmenu.add_separator()
Adminmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="HOME", menu=Adminmenu)
# Home Menu End
# Transfer Menu Start
def credit():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
list1 = ["CUSTOMER NAME:", "ACCOUNT NO:","FROM BANK DETAILS:","TO BANK DETAILS:","TO BANK ACCOUNT NO:","TAX OR NOT:","PAN NO:","AMOUNT:","MOBILE:"]
L1=Label(filewin,text=list1[0],font="Arial 12 bold")
L1.pack()
E1 = Entry(filewin, bd =5)
E1.pack()
L2=Label(filewin,text=list1[1],font="Arial 12 bold")
L2.pack()
E2 = Entry(filewin, bd =5)
E2.pack()
L3=Label(filewin,text=list1[2],font="Arial 12 bold")
L3.pack()
E3 = Entry(filewin, bd =5)
E3.pack()
L4=Label(filewin,text=list1[3],font="Arial 12 bold")
L4.pack()
E4 = Entry(filewin, bd =5)
E4.pack()
L5=Label(filewin,text=list1[4],font="Arial 12 bold")
L5.pack()
E5 = Entry(filewin, bd =5)
E5.pack()
L6=Label(filewin,text=list1[5],font="Arial 12 bold")
L6.pack()
E6 = Entry(filewin, bd =5)
E6.pack()
L7=Label(filewin,text=list1[6],font="Arial 12 bold")
L7.pack()
E7 = Entry(filewin, bd =5)
E7.pack()
L8=Label(filewin,text=list1[7],font="Arial 12 bold")
L8.pack()
E8 = Entry(filewin, bd =5)
E8.pack()
L9=Label(filewin,text=list1[8],font="Arial 12 bold")
L9.pack()
E9 = Entry(filewin, bd =5)
E9.pack()
def creditdata():
db=sqlite3.connect('saran.db')
cursor=db.cursor()
cursor.execute('insert into credit (name,acno,frombank,tobank,toacno,tax,pan,amount,mobile) values("%s","%s","%s","%s","%s","%s","%s","%s","%s")' % \
(E1.get(),E2.get(),E3.get(),E4.get(),E5.get(),E6.get(),E7.get(),E8.get(),E9.get()))
db.commit()
db.close()
if E1.get() and E2.get() and E3.get() and E4.get() and E5.get() and E6.get() and E7.get() and E8.get() and E9.get():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
s= Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
L7=Label(filewin,text="Record Store Successfully")
L7.pack()
else:
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
s= Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
L7=Label(filewin,text="Record did not Record")
L7.pack()
b = Button(filewin,text="Submit", width=10,command=creditdata)
b.pack()
def depit():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
list1 = ["CUSTOMER NAME:", "ACCOUNT NO:","FROM BANK DETAILS:","TO BANK DETAILS:","TO BANK ACCOUNT NO:","TAX OR NOT:","PAN NO:","AMOUNT:","MOBILE:"]
L1=Label(filewin,text=list1[0],font="Arial 12 bold")
L1.pack()
E1 = Entry(filewin, bd =5)
E1.pack()
L2=Label(filewin,text=list1[1],font="Arial 12 bold")
L2.pack()
E2 = Entry(filewin, bd =5)
E2.pack()
L3=Label(filewin,text=list1[2],font="Arial 12 bold")
L3.pack()
E3 = Entry(filewin, bd =5)
E3.pack()
L4=Label(filewin,text=list1[3],font="Arial 12 bold")
L4.pack()
E4 = Entry(filewin, bd =5)
E4.pack()
L5=Label(filewin,text=list1[4],font="Arial 12 bold")
L5.pack()
E5 = Entry(filewin, bd =5)
E5.pack()
L6=Label(filewin,text=list1[5],font="Arial 12 bold")
L6.pack()
E6 = Entry(filewin, bd =5)
E6.pack()
L7=Label(filewin,text=list1[6],font="Arial 12 bold")
L7.pack()
E7 = Entry(filewin, bd =5)
E7.pack()
L8=Label(filewin,text=list1[7],font="Arial 12 bold")
L8.pack()
E8 = Entry(filewin, bd =5)
E8.pack()
L9=Label(filewin,text=list1[8],font="Arial 12 bold")
L9.pack()
E9 = Entry(filewin, bd =5)
E9.pack()
def depitdata():
db=sqlite3.connect('saran.db')
cursor=db.cursor()
cursor.execute('insert into depit (name,acno,frombank,tobank,toacno,tax,pan,amount,mobile) values("%s","%s","%s","%s","%s","%s","%s","%s","%s")' % \
(E1.get(),E2.get(),E3.get(),E4.get(),E5.get(),E6.get(),E7.get(),E8.get(),E9.get()))
db.commit()
db.close()
if E1.get() and E2.get() and E3.get() and E4.get() and E5.get() and E6.get() and E7.get() and E8.get() and E9.get():
filewin = Toplevel(root)
filewin.title("Hospital Management")
s= Label(filewin,text="Hospital Management",bg="blue",fg="white",font="Arial 10 bold").pack(side=TOP)
L7=Label(filewin,text="Record Store Successfully")
L7.pack()
else:
filewin = Toplevel(root)
filewin.title("Hospital Management")
s= Label(filewin,text="Hospital Management",bg="blue",fg="white",font="Arial 10 bold").pack(side=TOP)
L7=Label(filewin,text="Record did not Record")
L7.pack()
b = Button(filewin,text="Submit", width=10,command=depitdata)
b.pack()
def update():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
def creditupdate():
import sqlite3
conn = sqlite3.connect('saran.db')
c = conn.cursor()
class Application:
def __init__(self, master):
self.master = master
# heading label
self.heading = Label(master, text="Update Credit",bg="blue",fg="white",font="Arial 10 bold" )
self.heading.pack(side=TOP)
# search criteria -->name
self.name = Label(master, text="Enter Customer Acno",font="Arial 12 bold")
self.name.pack()
# entry for the name
self.namenet = Entry(master,bd=5)
self.namenet.pack()
# search button
self.search = Button(master, text="Search", width=10, command=self.search_db)
self.search.pack()
# function to search
def search_db(self):
self.input = self.namenet.get()
# execute sql
sql = "SELECT * FROM credit WHERE acno LIKE ?"
self.res = c.execute(sql, (self.input,))
for self.row in self.res:
self.name1 = self.row[0]
self.acno = self.row[1]
self.frombank = self.row[2]
self.tobank = self.row[3]
self.toacno = self.row[4]
self.tax = self.row[5]
self.pan= self.row[6]
self.amount= self.row[7]
self.mobile= self.row[8]
# creating the update form
self.uname = Label(self.master, text="Customer Name", font="Arial 12 bold")
self.uname.pack()
self.ent1 = Entry(self.master,bd=5)
self.ent1.pack()
self.ent1.insert(END, str(self.name1))
self.uacno = Label(self.master, text="Acno", font="Arial 12 bold")
self.uacno.pack()
self.ent2 = Entry(self.master, bd=5)
self.ent2.pack()
self.ent2.insert(END, str(self.acno))
self.ufrombank = Label(self.master, text="From bank", font="Arial 12 bold")
self.ufrombank.pack()
self.ent3 = Entry(self.master,bd=5)
self.ent3.pack()
self.ent3.insert(END, str(self.frombank))
self.utobank = Label(self.master, text="To bank",font="Arial 12 bold")
self.utobank .pack()
self.ent4 = Entry(self.master, bd=5)
self.ent4.pack()
self.ent4.insert(END, str(self.tobank))
self.utoacno = Label(self.master, text="To acno",font="Arial 12 bold")
self.utoacno.pack()
self.ent5 = Entry(self.master, bd=5)
self.ent5.pack()
self.ent5.insert(END, str(self.toacno))
self.utax = Label(self.master, text="Tax or Not ",font="Arial 12 bold")
self.utax.pack()
self.ent6 = Entry(self.master, bd=5)
self.ent6.pack()
self.ent6.insert(END, str(self.tax))
self.upan = Label(self.master, text="Pan No",font="Arial 12 bold")
self.upan.pack()
self.ent7 = Entry(self.master, bd=5)
self.ent7.pack()
self.ent7.insert(END, str(self.pan))
self.uamount = Label(self.master, text="Amount",font="Arial 12 bold")
self.uamount.pack()
self.ent8 = Entry(self.master, bd=5)
self.ent8.pack()
self.ent8.insert(END, str(self.amount))
self.umobile = Label(self.master, text="Mobile",font="Arial 12 bold")
self.umobile.pack()
self.ent9 = Entry(self.master, bd=5)
self.ent9.pack()
self.ent9.insert(END, str(self.mobile))
self.update = Button(self.master, text="Update", width=10, bg='lightblue', command=self.update_db)
self.update.pack()
# button to delete
self.delete = Button(self.master, text="Delete", width=10, bg='red', command=self.delete_db)
self.delete.pack()
def update_db(self):
# declaring the variables to update
self.var1 = self.ent1.get() #updated name
self.var2 = self.ent2.get() #updated age
self.var3 = self.ent3.get() #updated gender
self.var4 = self.ent4.get() #updated location
self.var5 = self.ent5.get() #updated phone
self.var6 = self.ent6.get() #updated time
self.var7 = self.ent7.get() #updated time
self.var8 = self.ent8.get() #updated time
self.var9 = self.ent9.get() #updated time
query = "UPDATE credit SET name=?, acno=?, frombank=?,tobank=?,toacno=?, tax=?,pan=?,amount=?,mobile=? WHERE name LIKE ?"
c.execute(query, (self.var1, self.var2, self.var3, self.var4, self.var5, self.var6,self.var7,self.var8,self.var9,self.namenet.get(),))
conn.commit()
tkinter.messagebox.showinfo("Updated", "Successfully Updated.")
def delete_db(self):
# delete the appointment
sql2 = "DELETE FROM time WHERE name LIKE ?"
c.execute(sql2, (self.namenet.get(),))
conn.commit()
tkinter.messagebox.showinfo("Success", "Deleted Successfully")
self.ent1.destroy()
self.ent2.destroy()
self.ent3.destroy()
self.ent4.destroy()
self.ent5.destroy()
self.ent6.destroy()
self.ent7.destroy()
self.ent8.destroy()
self.ent9.destroy()
# creating the object
root = Tk()
b = Application(root)
root.mainloop()
a = Button(filewin,text="Credit", width=10,command=creditupdate)
a.pack()
def depitupdate():
import sqlite3
conn = sqlite3.connect('saran.db')
c = conn.cursor()
class Application:
def __init__(self, master):
self.master = master
# heading label
self.heading = Label(master, text="Update Credit",bg="blue",fg="white",font="Arial 10 bold" )
self.heading.pack(side=TOP)
# search criteria -->name
self.name = Label(master, text="Enter Customer Acno",font="Arial 12 bold")
self.name.pack()
# entry for the name
self.namenet = Entry(master,bd=5)
self.namenet.pack()
# search button
self.search = Button(master, text="Search", width=10, command=self.search_db)
self.search.pack()
# function to search
def search_db(self):
self.input = self.namenet.get()
# execute sql
sql = "SELECT * FROM depit WHERE acno LIKE ?"
self.res = c.execute(sql, (self.input,))
for self.row in self.res:
self.name1 = self.row[0]
self.acno = self.row[1]
self.frombank = self.row[2]
self.tobank = self.row[3]
self.toacno = self.row[4]
self.tax = self.row[5]
self.pan= self.row[6]
self.amount= self.row[7]
self.mobile= self.row[8]
# creating the update form
self.uname = Label(self.master, text="Customer Name", font="Arial 12 bold")
self.uname.pack()
self.ent1 = Entry(self.master,bd=5)
self.ent1.pack()
self.ent1.insert(END, str(self.name1))
self.uacno = Label(self.master, text="Acno", font="Arial 12 bold")
self.uacno.pack()
self.ent2 = Entry(self.master, bd=5)
self.ent2.pack()
self.ent2.insert(END, str(self.acno))
self.ufrombank = Label(self.master, text="From bank", font="Arial 12 bold")
self.ufrombank.pack()
self.ent3 = Entry(self.master,bd=5)
self.ent3.pack()
self.ent3.insert(END, str(self.frombank))
self.utobank = Label(self.master, text="To bank",font="Arial 12 bold")
self.utobank .pack()
self.ent4 = Entry(self.master, bd=5)
self.ent4.pack()
self.ent4.insert(END, str(self.tobank))
self.utoacno = Label(self.master, text="To acno",font="Arial 12 bold")
self.utoacno.pack()
self.ent5 = Entry(self.master, bd=5)
self.ent5.pack()
self.ent5.insert(END, str(self.toacno))
self.utax = Label(self.master, text="Tax or Not ",font="Arial 12 bold")
self.utax.pack()
self.ent6 = Entry(self.master, bd=5)
self.ent6.pack()
self.ent6.insert(END, str(self.tax))
self.upan = Label(self.master, text="Pan No",font="Arial 12 bold")
self.upan.pack()
self.ent7 = Entry(self.master, bd=5)
self.ent7.pack()
self.ent7.insert(END, str(self.pan))
self.uamount = Label(self.master, text="Amount",font="Arial 12 bold")
self.uamount.pack()
self.ent8 = Entry(self.master, bd=5)
self.ent8.pack()
self.ent8.insert(END, str(self.amount))
self.umobile = Label(self.master, text="Mobile",font="Arial 12 bold")
self.umobile.pack()
self.ent9 = Entry(self.master, bd=5)
self.ent9.pack()
self.ent9.insert(END, str(self.mobile))
self.update = Button(self.master, text="Update", width=10, bg='lightblue', command=self.update_db)
self.update.pack()
# button to delete
self.delete = Button(self.master, text="Delete", width=10, bg='red', command=self.delete_db)
self.delete.pack()
def update_db(self):
# declaring the variables to update
self.var1 = self.ent1.get() #updated name
self.var2 = self.ent2.get() #updated age
self.var3 = self.ent3.get() #updated gender
self.var4 = self.ent4.get() #updated location
self.var5 = self.ent5.get() #updated phone
self.var6 = self.ent6.get() #updated time
self.var7 = self.ent7.get() #updated time
self.var8 = self.ent8.get() #updated time
self.var9 = self.ent9.get() #updated time
query = "UPDATE depit SET name=?, acno=?, frombank=?,tobank=?,toacno=?, tax=?,pan=?,amount=?,mobile=? WHERE name LIKE ?"
c.execute(query, (self.var1, self.var2, self.var3, self.var4, self.var5, self.var6,self.var7,self.var8,self.var9,self.namenet.get(),))
conn.commit()
tkinter.messagebox.showinfo("Updated", "Successfully Updated.")
def delete_db(self):
# delete the appointment
sql2 = "DELETE FROM depit WHERE name LIKE ?"
c.execute(sql2, (self.namenet.get(),))
conn.commit()
tkinter.messagebox.showinfo("Success", "Deleted Successfully")
self.ent1.destroy()
self.ent2.destroy()
self.ent3.destroy()
self.ent4.destroy()
self.ent5.destroy()
self.ent6.destroy()
self.ent7.destroy()
self.ent8.destroy()
self.ent9.destroy()
# creating the object
root = Tk()
b = Application(root)
root.mainloop()
b = Button(filewin,text="Depit", width=10,command=depitupdate)
b.pack()
transmenu = Menu(menubar, tearoff=0)
transmenu.add_command(label="CREDIT",command=credit)
transmenu.add_command(label="DEPIT",command=depit)
transmenu.add_command(label="SEARCH",command=update)
transmenu.add_separator()
transmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="TRANSFER", menu=transmenu)
# Transfer Menu End
# Bank Transfer Menu Start
def bankname():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
L1=Button(filewin,text="SBI",bd=5,height=2,width=20,bg="skyblue",fg="white",font="Arial 10 bold")
L1.pack()
L2=Button(filewin,text="IOB",bd=5,height=2,width=20,bg="red",fg="white",font="Arial 10 bold")
L2.pack()
L3=Button(filewin,text="CITY UNION BANK",bd=5,height=2,width=20,bg="teal",fg="white",font="Arial 10 bold")
L3.pack()
L4=Button(filewin,text="DHL EXPRESS",bd=5,height=2,width=20,bg="orange",fg="white",font="Arial 10 bold")
L4.pack()
L5=Button(filewin,text="ICIC BANK",bd=5,height=2,width=20,bg="magenta",fg="white",font="Arial 10 bold")
L5.pack()
L6=Button(filewin,text="CANARA BANK",bd=5,height=2,width=20,bg="black",fg="white",font="Arial 10 bold")
L6.pack()
bankmenu = Menu(menubar, tearoff=0)
bankmenu.add_command(label="BANK TRANSFER",command=bankname)
bankmenu.add_separator()
bankmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="BANK", menu=bankmenu)
# Bank Transfer Menu End
# Online Transfer Menu Start
Onlinemenu = Menu(menubar, tearoff=0)
Onlinemenu.add_command(label="PAYPAL")
Onlinemenu.add_command(label="PAYTEM")
Onlinemenu.add_separator()
Onlinemenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="ONLINE TRANSFER", menu=Onlinemenu)
# Online Transfer Menu End
# Authorized Menu Start
Authmenu = Menu(menubar, tearoff=0)
Authmenu.add_command(label="CLIENT DETAILS")
Authmenu.add_command(label="MONEY TYPE TO EXCHANGE")
Authmenu.add_separator()
Authmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="AUTHORIZED MONEY EXCHANGE", menu=Authmenu)
# Authorized Menu End
# Tax Menu Start
Taxmenu = Menu(menubar, tearoff=0)
Taxmenu.add_command(label="HUGE SALARY CLIENT")
Taxmenu.add_command(label="INVOICE DATA")
Taxmenu.add_separator()
Taxmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="TAX", menu=Taxmenu)
# Tax Menu End
# HELP Menu Start
def developer():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="teal",fg="white",font="Arial 10 bold").pack(side=TOP)
def details():
filewin = Toplevel(root)
filewin.title("MONEY TRANSFER AND EXCHANGE")
w = Label(filewin,text="MONEY TRANSFER AND EXCHANGE",bg="blue",fg="white",font="Arial 10 bold").pack(side=TOP)
list1 = ["DEVELOPER NAME: P.SARAVANA KUMAR", "EMAIL:saravanastark8@gmail.com","MOBILE:7904026822","QUALIFICATION:MCA","COMPANY NAME:PSK TECHNOLOGY","PROJECT NAME:MONEY TRANSFER AND EXCHANGE","OPERATING SYSTEM:WINDOWS 32BIT","COPYRIGHT:PSK TECHNOLOGY","DEVELOPED YEAR & VERSION:7.4.2019 & VERSION 1.1"]
L1=Button(filewin,text=list1[0],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L1.pack()
L2=Button(filewin,text=list1[1],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L2.pack()
L3=Button(filewin,text=list1[2],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L3.pack()
L4=Button(filewin,text=list1[3],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L4.pack()
L5=Button(filewin,text=list1[4],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L5.pack()
L6=Button(filewin,text=list1[5],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L6.pack()
L7=Button(filewin,text=list1[6],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L7.pack()
L8=Button(filewin,text=list1[7],font="Arial 12 bold",bd=5,height=1,width=50,state=DISABLED)
L8.pack()
helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label="DETAILS",command=details)
helpmenu.add_command(label="DEVELOPER CONTACT",command=developer)
helpmenu.add_separator()
helpmenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="HELP", menu=helpmenu)
root.config(menu=menubar)
# HELP Menu End
#---------------------------Menu Bar End-------------------------------------#
root.mainloop()
Output:
Code & Concept Copyrights@Saravanakumar from psktechnology
Comments
Post a Comment