forked from Vijay-Gunwant/BankManagement-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.py
More file actions
70 lines (56 loc) · 2.46 KB
/
Copy pathMenu.py
File metadata and controls
70 lines (56 loc) · 2.46 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
import tkinter
from tkinter import *
import mysql.connector as mysql
def toTransfer(Options, AccNo):
Options.destroy()
from TransferMoney import Transfer_Creator
con = mysql.connect(host="localhost", user="root", password="vijay@1234", database="bank")
cursor = con.cursor()
cursor.execute(f'SELECT Cash FROM customer WHERE Acc={AccNo}')
result = cursor.fetchall()
Transfer_Creator(AccNo, result[0][0])
def toHome(Options):
Options.destroy()
from HomePage import Home_Creator
Home_Creator()
def toAcc(Options, AccNo):
con = mysql.connect(host="localhost", user="root", password="vijay@1234", database="bank")
cursor = con.cursor()
cursor.execute(f'SELECT * FROM customer WHERE Acc={AccNo}')
result = cursor.fetchall()
Options.destroy()
from AccInfo import AccInfo
AccInfo(result[0][0], result[0][1], result[0][2], result[0][3], result[0][4], result[0][6], result[0][5])
def Options_Creator(AccNo):
# Useful Variables
BackgroundColor = "#c6cdcf"
ButtonColor = "#c8dbde"
Options = tkinter.Tk()
# Window Setting
Options.geometry("500x500")
Options.resizable(False, False)
Options.title("Realities Bank - Create New Account")
Options.iconbitmap("./Images/bank.ico")
Options.config(bg=BackgroundColor)
# Logo Of Bank
logo = PhotoImage(file="Images/BankLogo.png")
BankLogo = Label(image=logo, bg=BackgroundColor)
BankLogo.place(x=30, y=0)
# Show Info Button
Show = Button(text="Show Info", font="Roboto 15 bold", bg=ButtonColor, cursor="hand2",
relief=RAISED, width=15, activebackground=ButtonColor, command=lambda: toAcc(Options, AccNo))
Show.place(x=145, y=200)
# Transaction Info Button
Transaction = Button(text="Transfer Money", font="Roboto 15 bold", bg=ButtonColor, cursor="hand2",
relief=RAISED, width=15, activebackground=ButtonColor,
command=lambda: toTransfer(Options, AccNo))
Transaction.place(x=145, y=260)
# Exit Button
Exit = Button(text="Exit", font="Roboto 15 bold", bg=ButtonColor, cursor="hand2",
relief=RAISED, width=15, activebackground=ButtonColor, command=exit)
Exit.place(x=145, y=320)
# Back Button
Back = Button(text="Back", font="Roboto 15 bold", bg=ButtonColor, cursor="hand2",
relief=RAISED, activebackground=ButtonColor, command=lambda: toHome(Options))
Back.place(x=5, y=450)
Options.mainloop()