CERTIFICATE
Session: 2023-2024 Roll No.____
This is to certify that Garv Singh Of standard 12th
CBSE of Modern Public School had been sincere and
hardworking throughout the practical and therefore he has
completed this project on the basis of the requirements of
CBSE rules and regulations.
………………………… …………………………
Internal Exam. Sign Principal’s Sign Stamp
………………………… …………………………
External Exam. Sign School stamp
INDEX
SR NO. Contents
1. Acknowledgement
2. Introduction
i. About PYTHON
ii. About MYSQL
iii. About Bank
Management
System
3. Source Code
4. Output
5. Bibliography
ACKNOWLEDGEMENT
It gives me a great pleasure to express my gratitude towards
our Computer Teacher Mr. Anurag Sharma for his
guidance, support and encouragement throughout the
duration of this project. I would also like to thanks to our
principal Madam for their encouragement. Without
their motivation and help, this project would not be
completed successfully.
Garv Singh
INTRODUCTION
ABOUT PYTHON:
Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics. Its high-
level built in data structures, combined with dynamic typing
and dynamic binding, make it very attractive for Rapid
Application Development, as well as for use as a scripting or
glue language to connect existing components together.
Python's simple, easy to learn syntax emphasizes readability
and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages
program modularity and code reuse. The Python interpreter
and the extensive standard library are available in source or
binary form without charge for all major platforms, and can
be freely distributed.
Often, programmers fall in love with Python because of the
increased productivity it provides. Since there is no
compilation step, the edit-test-debug cycle is incredibly fast.
Debugging Python programs is easy: a bug or bad input will
never cause a segmentation fault. Instead, when the
interpreter discovers an error, it raises an exception. When
the program doesn't catch the exception, the interpreter
prints a stack trace. A source level debugger allows
inspection of local and global variables, evaluation of
arbitrary expressions, setting breakpoints, stepping through
the code a line at a time, and so on. The debugger is written
in Python itself, testifying to Python's introspective power.
On the other hand, often the quickest way to debug a
program is to add a few print statements to the source: the
fast edit-test-debug cycle makes this simple approach very
effective.
ABOUT MYSQL :
MySQL is fast, reliable, scalable, and easy to use. It was
originally developed to handle large databases quickly and
has been used in highly demanding production
environments for many years.
Although MySQL is under constant development, it offers a
rich and useful set of functions. MySQL’s connectivity, speed,
and security make it highly suited for accessing databases on
the internet.
MySQL’s key benefits include
Ease of use: Developers can install MySQL in minutes,
and the database is easy to manage.
Reliability: MySQL is one of the most mature and widely
used databases. It has been tested in a wide variety of
scenarios for more than 25 years, including by many of
the world’s largest companies. Organizations depend on
MySQL to run business-critical applications because of
its reliability.
Scalability: MySQL scales to meet the demands of the
most accessed applications. MySQL’s native replication
architecture enables organizations such as Facebook to
scale applications to support billions of users.
Performance: MySQL HeatWave is faster and less
expensive than other database services, as
demonstrated by multiple standard industry
benchmarks, including TPC-H, TPC-DS, and CH-
benCHmark.
High availability: MySQL delivers a complete set of
native, fully integrated replication technologies for high
availability and disaster recovery. For business-critical
applications, and to meet service-level agreement
commitments, customers can achieve
Recovery point objective = 0 (zero data loss)
Recovery time objective = seconds (automatic failover)
Security: Data security entails protection and
compliance with industry and government regulations,
including the European Union General Data Protection
Regulation, the Payment Card Industry Data Security
Standard, the Health Insurance Portability and
Accountability Act, and the Defense Information
Systems Agency’s Security Technical Implementation
Guides. MySQL Enterprise Edition provides advanced
security features, including
authentication/authorization, transparent data
encryption, auditing, data masking, and a database
firewall.
Flexibility: The MySQL Document Store gives users
maximum flexibility in developing traditional SQL and
NoSQL schema-free database applications. Developers
can mix and match relational data and JSON documents
in the same database and application.
Bank Management System:
A bank is a financial institution which accepts deposits, pays
interest on pre-defined rates, clears checks, makes loans,
and often acts as an intermediary in financial transactions. It
also provides other financial services to its customers.
Bank management governs various concerns associated with
bank in order to maximize profits. The concerns broadly
include liquidity management, asset management, liability
management and capital management
SOURCE CODE
import os # for creating directories Admin/Customer if it is not exists.
from datetime import date # for date of account creation when new customer account is
created.
import tkinter as tk
from tkinter import *
# Backend python functions code starts :
def is_valid(customer_account_number):
try:
customer_database = open("./database/Customer/[Link]")
except FileNotFoundError:
[Link]("./database/Customer/[Link]", exist_ok=True)
print("# Customer database doesn't exists!\n# New Customer database created
automatically.")
customer_database = open("./database/Customer/[Link]", "a")
else: # if customer account number is already allocated then this will return false.
otherwise true.
if check_credentials(customer_account_number, "DO_NOT_CHECK", 2, True):
return False
else:
return True
customer_database.close()
def check_leap(year):
return ((int(year) % 4 == 0) and (int(year) % 100 != 0)) or (int(year) % 400 == 0)
def check_date(date):
days_in_months = ["31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31"]
days_in_months_in_leap_year = ["31", "29", "31", "30", "31", "30", "31", "31", "30", "31",
"30", "31"]
if date == "":
return False
date_elements = [Link]("/")
day = int(date_elements[0])
month = int(date_elements[1])
year = int(date_elements[2])
if (year > 2021 or year < 0) or (month > 12 or month < 1):
return False
else:
if check_leap(year):
numOfDays = days_in_months_in_leap_year[month - 1]
else:
numOfDays = days_in_months[month - 1]
return int(numOfDays) >= day >= 1
def is_valid_mobile(mobile_number):
if mobile_number.__len__() == 10 and mobile_number.isnumeric():
return True
else:
return False
def append_data(database_path, data):
customer_database = open(database_path, "a")
customer_database.write(data)
def display_account_summary(identity, choice): # choice 1 for full summary; choice 2 for
only account balance.
flag = 0
customer_database = open("./database/Customer/[Link]")
output_message = ""
for line in customer_database:
if identity == [Link]("\n", ""):
if choice == 1:
output_message += "Account number : " + [Link]("\n", "") + "\n"
customer_database.__next__() # skipping pin
output_message += "Current balance : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Date of account creation : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Name of account holder : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Type of account : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Date of Birth : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Mobile number : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "Gender : " + customer_database.__next__().replace("\n",
"") + "\n"
output_message += "Nationality : " +
customer_database.__next__().replace("\n", "") + "\n"
output_message += "KYC : " + customer_database.__next__().replace("\n", "") +
"\n"
else:
customer_database.readline() # skipped pin
output_message += "Current balance : " +
customer_database.readline().replace("\n", "") + "\n"
flag = 1
break
else:
for index in range(11):
fetched_line = customer_database.readline()
if fetched_line is not None:
continue
else:
break
if flag == 0:
print("\n# No account associated with the entered account number exists! #")
return output_message
def delete_customer_account(identity, choice): # choice 1 for admin, choice 2 for
customer
customer_database = open("./database/Customer/[Link]")
data_collector = ""
flag = 0
for line in customer_database:
if identity == [Link]("\n", ""):
flag = 1
for index in range(11):
customer_database.readline() # skipping the line
else:
data_collector += line
for index in range(11):
data_collector += customer_database.readline()
customer_database = open("./database/Customer/[Link]", "w")
customer_database.write(data_collector)
if flag == 1:
output_message = "Account with account no." + str(identity) + " closed successfully!"
if choice == 1:
adminMenu.printMessage_outside(output_message)
print(output_message)
else:
output_message = "Account not found !"
if choice == 1:
adminMenu.printMessage_outside(output_message)
print(output_message)
def create_admin_account(identity, password):
admin_database = open("./database/Admin/[Link]", "a")
admin_id = identity
admin_password = password
append_data("./database/Admin/[Link]", admin_id + "\n" + admin_password
+ "\n" + "*\n")
output_message = "Admin account created successfully !"
adminMenu.printMessage_outside(output_message)
print(output_message)
admin_database.close()
def delete_admin_account(identity):
admin_database = open("./database/Admin/[Link]")
data_collector = ""
flag = 0
for line in admin_database:
if identity == [Link]("\n", ""):
flag = 1
for index in range(2):
admin_database.readline()
else:
data_collector += line
for index in range(2):
data_collector += admin_database.readline()
admin_database = open("./database/Admin/[Link]", "w")
admin_database.write(data_collector)
if flag == 1:
output_message = "Account with account id " + identity + " closed successfully!"
print(output_message)
adminMenu.printMessage_outside(output_message)
else:
output_message = "Account not found :("
adminMenu.printMessage_outside(output_message)
print(output_message)
def change_PIN(identity, new_PIN):
customer_database = open("./database/Customer/[Link]")
data_collector = ""
for line in customer_database:
if identity == [Link]("\n", ""):
data_collector += line # ID
data_collector += str(new_PIN) + "\n" # PIN changed
customer_database.readline()
for index in range(10):
data_collector += customer_database.readline()
else:
data_collector += line
for index in range(11):
data_collector += customer_database.readline()
customer_database.close()
customer_database = open("./database/Customer/[Link]", "w")
customer_database.write(data_collector)
output_message = "PIN changed successfully."
customerMenu.printMessage_outside(output_message)
print(output_message)
def transaction(identity, amount, choice): # choice 1 for deposit; choice 2 for withdraw
customer_database = open("./database/Customer/[Link]")
data_collector = ""
balance = 0
for line in customer_database:
if identity == [Link]("\n", ""):
data_collector += line # ID
data_collector += customer_database.readline() # PIN
balance = float(customer_database.readline().replace("\n", ""))
if choice == 2 and balance - amount < 10000: # Minimum balance 10000
return -1
else:
if choice == 1:
balance += amount
else:
balance -= amount
data_collector += str(balance) + "\n"
for index in range(9):
data_collector += customer_database.readline()
else:
data_collector += line
for index in range(11):
data_collector += customer_database.readline()
customer_database.close()
customer_database = open("./database/Customer/[Link]", "w")
customer_database.write(data_collector)
return balance
def check_credentials(identity, password, choice,
admin_access): # checks credentials of admin/customer and returns True
or False
folder_name = "./database/Admin" if (choice == 1) else "./database/Customer"
file_name = "/[Link]" if (choice == 1) else "/[Link]"
try:
[Link](folder_name, exist_ok=True)
database = open(folder_name + file_name, "r")
except FileNotFoundError:
print("#", folder_name[2:], "database doesn't exists!\n# New", folder_name[2:],
"database created automatically.")
database = open(folder_name + file_name, "a")
if choice == 1:
[Link]("admin\nadmin@123\n*\n")
else:
is_credentials_correct = False
for line in database:
id_fetched = [Link]("\n", "")
password_fetched = database.__next__().replace("\n", "")
if id_fetched == identity:
if ((password == "DO_NOT_CHECK_ADMIN" and choice == 1 and admin_access
== False) or (
password == "DO_NOT_CHECK" and choice == 2 and admin_access == True)
or password_fetched == password):
is_credentials_correct = True
[Link]()
return True
if choice == 1: # skips unnecessary lines in admin database.
database.__next__() # skipping line
else: # skips unnecessary lines in customer database.
for index in range(10):
fetched_line = [Link]()
if fetched_line is not None:
continue
else:
break
if is_credentials_correct:
print("Success!")
else:
print("Failure!")
[Link]()
return False
# Backend python functions code ends.
# Tkinter GUI code starts :
class welcomeScreen:
def __init__(self, window=None):
[Link] = window
[Link]("600x450+383+106")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Welcome to New BANK")
p1 = PhotoImage(file='./images/[Link]')
[Link](True, p1)
[Link](background="#023047")
[Link](cursor="arrow")
self.Canvas1 = [Link](window, background="#ffff00", borderwidth="0",
insertbackground="black",
relief="ridge",
selectbackground="blue", selectforeground="white")
[Link](relx=0.190, rely=0.228, relheight=0.496, relwidth=0.622)
self.Button1 = [Link](self.Canvas1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#023047",
disabledforeground="#a3a3a3",
foreground="#fbfbfb", borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0",
text='''EMPLOYEE''')
[Link](font="-family {Segoe UI} -size 10 -weight bold")
[Link](relx=0.161, rely=0.583, height=24, width=87)
self.Button2 = [Link](self.Canvas1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#023047",
disabledforeground="#a3a3a3",
foreground="#f9f9f9", borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0",
text='''CUSTOMER''')
[Link](font="-family {Segoe UI} -size 10 -weight bold")
[Link](relx=0.617, rely=0.583, height=24, width=87)
self.Label1 = [Link](self.Canvas1, background="#ffff00",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 13 -weight bold",
foreground="#000000",
text='''Please select your role''')
[Link](relx=0.241, rely=0.224, height=31, width=194)
def selectEmployee(self):
[Link]()
adminLogin(Toplevel([Link]))
def selectCustomer(self):
[Link]()
CustomerLogin(Toplevel([Link]))
class Error:
def __init__(self, window=None):
global master
master = window
[Link]("411x117+485+248")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Error")
[Link](background="#f2f3f4")
global Label2
self.Button1 = [Link](window, background="#d3d8dc", borderwidth="1",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 9", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text='''OK''',
command=[Link])
[Link](relx=0.779, rely=0.598, height=24, width=67)
global _img0
_img0 = [Link](file="./images/error_image.png")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
image=_img0, text='''Label''')
[Link](relx=0.024, rely=0.0, height=81, width=84)
def setMessage(self, message_shown):
Label2 = [Link](master, background="#f2f3f4", disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 16", foreground="#000000",
highlightcolor="#646464646464",
text=message_shown)
[Link](relx=0.210, rely=0.171, height=41, width=214)
def goback(self):
[Link]()
class adminLogin:
def __init__(self, window=None):
[Link] = window
[Link]("743x494+338+92")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Admin")
[Link](background="#ffff00")
global Canvas1
Canvas1 = [Link](window, background="#ffffff", insertbackground="black",
relief="ridge",
selectbackground="blue", selectforeground="white")
[Link](relx=0.108, rely=0.142, relheight=0.715, relwidth=0.798)
self.Label1 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 14 -weight bold",
foreground="#00254a",
text="Admin Login")
[Link](relx=0.135, rely=0.142, height=41, width=154)
global Label2
Label2 = [Link](Canvas1, background="#ffffff", disabledforeground="#a3a3a3",
foreground="#000000")
[Link](relx=0.067, rely=0.283, height=181, width=233)
global _img0
_img0 = [Link](file="./images/[Link]")
[Link](image=_img0)
self.Entry1 = [Link](Canvas1, background="#e2e2e2", borderwidth="2",
disabledforeground="#a3a3a3",
font="TkFixedFont", foreground="#000000",
highlightbackground="#b6b6b6",
highlightcolor="#004080", insertbackground="black")
[Link](relx=0.607, rely=0.453, height=20, relwidth=0.26)
self.Entry1_1 = [Link](Canvas1, show='*', background="#e2e2e2", borderwidth="2",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000",
highlightbackground="#d9d9d9", highlightcolor="#004080",
insertbackground="black",
selectbackground="blue", selectforeground="white")
self.Entry1_1.place(relx=0.607, rely=0.623, height=20, relwidth=0.26)
self.Label3 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.556, rely=0.453, height=21, width=34)
global _img1
_img1 = [Link](file="./images/[Link]")
[Link](image=_img1)
self.Label4 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.556, rely=0.623, height=21, width=34)
global _img2
_img2 = [Link](file="./images/[Link]")
[Link](image=_img2)
self.Label5 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.670, rely=0.142, height=71, width=74)
global _img3
_img3 = [Link](file="./images/[Link]")
[Link](image=_img3)
[Link] = [Link](Canvas1, text="Login", borderwidth="0", width=10,
background="#ffff00",
foreground="#00254a",
font="-family {Segoe UI} -size 10 -weight bold",
command=lambda: [Link]([Link](), self.Entry1_1.get()))
[Link](relx=0.765, rely=0.755)
self.Button_back = [Link](Canvas1, text="Back", borderwidth="0", width=10,
background="#ffff00",
foreground="#00254a",
font="-family {Segoe UI} -size 10 -weight bold",
command=[Link])
self.Button_back.place(relx=0.545, rely=0.755)
global admin_img
admin_img = [Link](file="./images/[Link]")
def back(self):
[Link]()
welcomeScreen(Toplevel([Link]))
@staticmethod
def setImg():
Label2 = [Link](Canvas1, background="#ffffff", disabledforeground="#a3a3a3",
foreground="#000000")
[Link](relx=0.067, rely=0.283, height=181, width=233)
[Link](image=admin_img)
def login(self, admin_id, admin_password):
global admin_idNO
admin_idNO = admin_id
if check_credentials(admin_id, admin_password, 1, True):
[Link]()
adminMenu(Toplevel([Link]))
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid Credentials!")
[Link]()
class CustomerLogin:
def __init__(self, window=None):
[Link] = window
[Link]("743x494+338+92")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Customer")
[Link](background="#00254a")
global Canvas1
Canvas1 = [Link](window, background="#ffffff", insertbackground="black",
relief="ridge",
selectbackground="blue", selectforeground="white")
[Link](relx=0.108, rely=0.142, relheight=0.715, relwidth=0.798)
Label1 = [Link](Canvas1, background="#ffffff", disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 14 -weight bold", foreground="#00254a",
text="Customer Login")
[Link](relx=0.135, rely=0.142, height=41, width=154)
global Label2
Label2 = [Link](Canvas1, background="#ffffff", disabledforeground="#a3a3a3",
foreground="#000000")
[Link](relx=0.067, rely=0.283, height=181, width=233)
global _img0
_img0 = [Link](file="./images/[Link]")
[Link](image=_img0)
self.Entry1 = [Link](Canvas1, background="#e2e2e2", borderwidth="2",
disabledforeground="#a3a3a3",
font="TkFixedFont", foreground="#000000",
highlightbackground="#b6b6b6",
highlightcolor="#004080", insertbackground="black")
[Link](relx=0.607, rely=0.453, height=20, relwidth=0.26)
self.Entry1_1 = [Link](Canvas1, show='*', background="#e2e2e2", borderwidth="2",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000",
highlightbackground="#d9d9d9", highlightcolor="#004080",
insertbackground="black",
selectbackground="blue", selectforeground="white")
self.Entry1_1.place(relx=0.607, rely=0.623, height=20, relwidth=0.26)
self.Label3 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.556, rely=0.453, height=21, width=34)
global _img1
_img1 = [Link](file="./images/[Link]")
[Link](image=_img1)
self.Label4 = [Link](Canvas1)
[Link](relx=0.556, rely=0.623, height=21, width=34)
global _img2
_img2 = [Link](file="./images/[Link]")
[Link](image=_img2, background="#ffffff")
self.Label5 = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.670, rely=0.142, height=71, width=74)
global _img3
_img3 = [Link](file="./images/[Link]")
[Link](image=_img3)
[Link] = [Link](Canvas1, text="Login", borderwidth="0", width=10,
background="#00254a",
foreground="#ffffff",
font="-family {Segoe UI} -size 10 -weight bold",
command=lambda: [Link]([Link](), self.Entry1_1.get()))
[Link](relx=0.765, rely=0.755)
self.Button_back = [Link](Canvas1, text="Back", borderwidth="0", width=10,
background="#00254a",
foreground="#ffffff",
font="-family {Segoe UI} -size 10 -weight bold",
command=[Link])
self.Button_back.place(relx=0.545, rely=0.755)
global customer_img
customer_img = [Link](file="./images/[Link]")
def back(self):
[Link]()
welcomeScreen(Toplevel([Link]))
@staticmethod
def setImg():
settingIMG = [Link](Canvas1, background="#ffffff",
disabledforeground="#a3a3a3", foreground="#000000")
[Link](relx=0.067, rely=0.283, height=181, width=233)
[Link](image=customer_img)
def login(self, customer_account_number, customer_PIN):
if check_credentials(customer_account_number, customer_PIN, 2, False):
global customer_accNO
customer_accNO = str(customer_account_number)
[Link]()
customerMenu(Toplevel([Link]))
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid Credentials!")
[Link]()
class adminMenu:
def __init__(self, window=None):
[Link] = window
[Link]("743x494+329+153")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Admin Section")
[Link](background="#ffff00")
self.Labelframe1 = [Link](window, relief='groove', font="-family {Segoe UI} -
size 13 -weight bold",
foreground="#001c37", text="Select your option",
background="#fffffe")
[Link](relx=0.081, rely=0.081, relheight=0.415, relwidth=0.848)
self.Button1 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Close bank account", command=[Link])
[Link](relx=0.667, rely=0.195, height=34, width=181,
bordermode='ignore')
self.Button2 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Create bank account", command=[Link])
[Link](relx=0.04, rely=0.195, height=34, width=181, bordermode='ignore')
self.Button3 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Exit",
command=[Link])
[Link](relx=0.667, rely=0.683, height=34, width=181,
bordermode='ignore')
self.Button4 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Create admin account", command=[Link])
[Link](relx=0.04, rely=0.439, height=34, width=181,
bordermode='ignore')
self.Button5 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Close admin account", command=[Link])
[Link](relx=0.667, rely=0.439, height=34, width=181,
bordermode='ignore')
self.Button6 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#00254a", foreground="#fffffe", borderwidth="0",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 11",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Check account summary", command=[Link])
[Link](relx=0.04, rely=0.683, height=34, width=181,
bordermode='ignore')
global Frame1
Frame1 = [Link](window, relief='groove', borderwidth="2", background="#fffffe")
[Link](relx=0.081, rely=0.547, relheight=0.415, relwidth=0.848)
def closeAccount(self):
CloseAccountByAdmin(Toplevel([Link]))
def createCustaccount(self):
createCustomerAccount(Toplevel([Link]))
def createAdmin(self):
createAdmin(Toplevel([Link]))
def deleteAdmin(self):
deleteAdmin(Toplevel([Link]))
def showAccountSummary(self):
checkAccountSummary(Toplevel([Link]))
def printAccountSummary(identity):
# clearing the frame
for widget in Frame1.winfo_children():
[Link]()
# getting output_message and displaying it in the frame
output = display_account_summary(identity, 1)
output_message = Label(Frame1, text=output, background="#fffffe")
output_message.pack(pady=20)
def printMessage_outside(output):
# clearing the frame
for widget in Frame1.winfo_children():
[Link]()
# getting output_message and displaying it in the frame
output_message = Label(Frame1, text=output, background="#fffffe")
output_message.pack(pady=20)
def exit(self):
[Link]()
adminLogin(Toplevel([Link]))
class CloseAccountByAdmin:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+498+261")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Close customer account")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3",
text='''Enter account number:''')
[Link](relx=0.232, rely=0.220, height=20, width=120)
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.536, rely=0.220, height=20, relwidth=0.232)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", borderwidth="0",
background="#004080", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Back",
command=[Link])
[Link](relx=0.230, rely=0.598, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Proceed",
command=lambda: [Link]([Link]()))
[Link](relx=0.598, rely=0.598, height=24, width=67)
def back(self):
[Link]()
def submit(self, identity):
if not is_valid(identity):
delete_customer_account(identity, 1)
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Account doesn't exist!")
return
[Link]()
class createCustomerAccount:
def __init__(self, window=None):
[Link] = window
[Link]("411x403+437+152")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Create account")
[Link](background="#f2f3f4")
[Link](highlightbackground="#d9d9d9")
[Link](highlightcolor="black")
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.027, height=20, relwidth=0.302)
self.Label1 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Account number:''')
[Link](relx=0.219, rely=0.025, height=26, width=120)
self.Label2 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Full name:''')
[Link](relx=0.316, rely=0.099, height=27, width=75)
self.Entry2 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3",
font="TkFixedFont", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", insertbackground="black",
selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.099, height=20, relwidth=0.302)
self.Label3 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Account type:''')
[Link](relx=0.287, rely=0.169, height=26, width=83)
global acc_type
acc_type = StringVar()
self.Radiobutton1 = [Link](window, activebackground="#ececec",
activeforeground="#000000",
background="#f2f3f4", disabledforeground="#a3a3a3",
foreground="#000000",
highlightbackground="#d9d9d9", highlightcolor="black",
justify='left',
text='''Savings''', variable=acc_type, value="Savings")
[Link](relx=0.511, rely=0.174, relheight=0.057, relwidth=0.151)
self.Radiobutton1_1 = [Link](window, activebackground="#ececec",
activeforeground="#000000",
background="#f2f3f4", disabledforeground="#a3a3a3",
foreground="#000000",
highlightbackground="#d9d9d9", highlightcolor="black",
justify='left',
text='''Current''', variable=acc_type, value="Current")
self.Radiobutton1_1.place(relx=0.706, rely=0.174, relheight=0.057, relwidth=0.175)
[Link]()
self.Radiobutton1_1.deselect()
self.Label5 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightcolor="black", text='''Mobile number:''')
[Link](relx=0.268, rely=0.323, height=22, width=85)
self.Label4 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightcolor="black", text='''Birth date (DD/MM/YYYY):''')
[Link](relx=0.090, rely=0.238, height=27, width=175)
self.Entry5 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.323, height=20, relwidth=0.302)
self.Entry4 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.248, height=20, relwidth=0.302)
self.Label6 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightcolor="black", text='''Gender:''')
[Link](relx=0.345, rely=0.402, height=15, width=65)
global gender
gender = StringVar()
self.Radiobutton3 = [Link](window, activebackground="#ececec",
activeforeground="#000000",
background="#f2f3f4", disabledforeground="#a3a3a3",
foreground="#000000",
highlightcolor="black", justify='left',
text='''Male''', variable=gender, value="Male")
[Link](relx=0.481, rely=0.397, relheight=0.055, relwidth=0.175)
self.Radiobutton4 = [Link](window, activebackground="#ececec",
activeforeground="#000000",
background="#f2f3f4", disabledforeground="#a3a3a3",
foreground="#000000",
highlightbackground="#d9d9d9", highlightcolor="black",
justify='left',
text='''Female''', variable=gender, value="Female")
[Link](relx=0.706, rely=0.397, relheight=0.055, relwidth=0.175)
[Link]()
[Link]()
self.Label7 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Nationality:''')
[Link](relx=0.309, rely=0.471, height=21, width=75)
self.Entry7 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3",
font="TkFixedFont", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", insertbackground="black",
selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.471, height=20, relwidth=0.302)
self.Entry9 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.623, height=20, relwidth=0.302)
self.Entry10 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3",
font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.7, height=20, relwidth=0.302)
self.Entry11 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
[Link](relx=0.511, rely=0.777, height=20, relwidth=0.302)
self.Label9 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''PIN:''')
[Link](relx=0.399, rely=0.62, height=21, width=35)
self.Label10 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Re-enter PIN:''')
[Link](relx=0.292, rely=0.695, height=21, width=75)
self.Label11 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Initial balance:''')
[Link](relx=0.292, rely=0.779, height=21, width=75)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Back''',
command=[Link])
[Link](relx=0.243, rely=0.893, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Proceed''',
command=lambda: self.create_acc([Link](), [Link](),
acc_type.get(),
[Link](), [Link](), [Link](),
[Link](), [Link](),
[Link](), [Link](),
[Link]()))
[Link](relx=0.633, rely=0.893, height=24, width=67)
self.Label8 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''KYC document name:''')
[Link](relx=0.18, rely=0.546, height=24, width=122)
self.Entry8 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.511, rely=0.546, height=20, relwidth=0.302)
def back(self):
[Link]()
def create_acc(self, customer_account_number, name, account_type, date_of_birth,
mobile_number, gender, nationality,
KYC_document,
PIN, confirm_PIN, initial_balance):
if is_valid(customer_account_number) and customer_account_number.isnumeric():
if name != "":
if account_type == "Savings" or account_type == "Current":
if check_date(date_of_birth):
if is_valid_mobile(mobile_number):
if gender == "Male" or gender == "Female":
if nationality.__len__() != 0:
if KYC_document.__len__() != 0:
if [Link]() and PIN.__len__() == 4:
if confirm_PIN == PIN:
if initial_balance.isnumeric():
output_message = "Customer account created
successfully!"
print(output_message)
adminMenu.printMessage_outside(output_message)
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid
balance!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="PIN mismatch!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid PIN!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Enter KYC document!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Enter Nationality!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Select gender!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid mobile number!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid date!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Select account type!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Name can't be empty!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Acc-number is invalid!")
return
today = [Link]() # set date of account creation
date_of_account_creation = [Link]("%d/%m/%Y")
# adding in database
data = customer_account_number + "\n" + PIN + "\n" + initial_balance + "\n" +
date_of_account_creation + "\n" + name + "\n" + account_type + "\n" + date_of_birth +
"\n" + mobile_number + "\n" + gender + "\n" + nationality + "\n" + KYC_document + "\n" +
"*\n"
append_data("./database/Customer/[Link]", data)
[Link]()
class createAdmin:
def __init__(self, window=None):
[Link] = window
[Link]("411x150+512+237")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Create admin account")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter admin ID:''')
[Link](relx=0.219, rely=0.067, height=27, width=104)
self.Label2 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter password:''')
[Link](relx=0.219, rely=0.267, height=27, width=104)
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.487, rely=0.087, height=20, relwidth=0.326)
self.Entry2 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.487, rely=0.287, height=20, relwidth=0.326)
self.Label3 = [Link](window, activebackground="#f9f9f9",
activeforeground="black", background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
highlightbackground="#d9d9d9",
highlightcolor="black", text='''Confirm password:''')
[Link](relx=0.195, rely=0.467, height=27, width=104)
self.Entry3 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.487, rely=0.487, height=20, relwidth=0.326)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Proceed",
command=lambda: self.create_admin_account([Link](),
[Link](),
[Link]()))
[Link](relx=0.598, rely=0.733, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text="Back",
command=[Link])
[Link](relx=0.230, rely=0.733, height=24, width=67)
def back(self):
[Link]()
def create_admin_account(self, identity, password, confirm_password):
if check_credentials(identity, "DO_NOT_CHECK_ADMIN", 1, False):
Error(Toplevel([Link]))
[Link](self, message_shown="ID is unavailable!")
else:
if password == confirm_password and len(password) != 0:
create_admin_account(identity, password)
[Link]()
else:
Error(Toplevel([Link]))
if password != confirm_password:
[Link](self, message_shown="Password Mismatch!")
else:
[Link](self, message_shown="Invalid password!")
class deleteAdmin:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+504+268")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Delete admin account")
[Link](background="#f2f3f4")
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.487, rely=0.092, height=20, relwidth=0.277)
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter admin ID:''')
[Link](relx=0.219, rely=0.092, height=21, width=104)
self.Label2 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter password:''')
[Link](relx=0.209, rely=0.33, height=21, width=109)
self.Entry1_1 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3",
font="TkFixedFont",
foreground="#000000", highlightbackground="#d9d9d9",
highlightcolor="black",
insertbackground="black", selectbackground="blue",
selectforeground="white")
self.Entry1_1.place(relx=0.487, rely=0.33, height=20, relwidth=0.277)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Back''',
command=[Link])
[Link](relx=0.243, rely=0.642, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
borderwidth="0", disabledforeground="#a3a3a3",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Proceed''',
command=lambda: self.delete_admin([Link](),
self.Entry1_1.get()))
[Link](relx=0.608, rely=0.642, height=24, width=67)
def delete_admin(self, admin_id, password):
if admin_id == "aayush" or admin_id == admin_idNO:
Error(Toplevel([Link]))
[Link](self, message_shown="Operation Denied!")
return
if check_credentials(admin_id, password, 1, True):
delete_admin_account(admin_id)
[Link]()
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid Credentials!")
def back(self):
[Link]()
class customerMenu:
def __init__(self, window=None):
[Link] = window
[Link]("743x494+329+153")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Customer Section")
[Link](background="#00254a")
self.Labelframe1 = [Link](window, relief='groove', font="-family {Segoe UI} -
size 13 -weight bold",
foreground="#000000", text='''Select your option''',
background="#fffffe")
[Link](relx=0.081, rely=0.081, relheight=0.415, relwidth=0.848)
self.Button1 = [Link](self.Labelframe1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#39a9fc",
borderwidth="0",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 11",
foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Withdraw''')
[Link](relx=0.667, rely=0.195, height=34, width=181,
bordermode='ignore')
self.Button2 = [Link](self.Labelframe1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#39a9fc",
borderwidth="0",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 11",
foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Deposit''')
[Link](relx=0.04, rely=0.195, height=34, width=181, bordermode='ignore')
self.Button3 = [Link](self.Labelframe1, command=[Link],
activebackground="#ececec",
activeforeground="#000000",
background="#39a9fc",
borderwidth="0", disabledforeground="#a3a3a3", font="-family
{Segoe UI} -size 11",
foreground="#fffffe", highlightbackground="#d9d9d9",
highlightcolor="black", pady="0",
text='''Exit''')
[Link](relx=0.667, rely=0.683, height=34, width=181,
bordermode='ignore')
self.Button4 = [Link](self.Labelframe1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#39a9fc",
borderwidth="0",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 11",
foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Change PIN''')
[Link](relx=0.04, rely=0.439, height=34, width=181,
bordermode='ignore')
self.Button5 = [Link](self.Labelframe1, command=[Link],
activebackground="#ececec",
activeforeground="#000000", background="#39a9fc",
borderwidth="0",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 11",
foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Close account''')
[Link](relx=0.667, rely=0.439, height=34, width=181,
bordermode='ignore')
self.Button6 = [Link](self.Labelframe1, activebackground="#ececec",
activeforeground="#000000",
background="#39a9fc", borderwidth="0",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 11", foreground="#fffffe",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Check your balance''', command=[Link])
[Link](relx=0.04, rely=0.683, height=34, width=181,
bordermode='ignore')
global Frame1_1_2
Frame1_1_2 = [Link](window, relief='groove', borderwidth="2",
background="#fffffe")
Frame1_1_2.place(relx=0.081, rely=0.547, relheight=0.415, relwidth=0.848)
def selectDeposit(self):
depositMoney(Toplevel([Link]))
def selectWithdraw(self):
withdrawMoney(Toplevel([Link]))
def selectChangePIN(self):
changePIN(Toplevel([Link]))
def selectCloseAccount(self):
[Link]()
closeAccount(Toplevel([Link]))
def exit(self):
[Link]()
CustomerLogin(Toplevel([Link]))
def checkBalance(self):
output = display_account_summary(customer_accNO, 2)
[Link](output)
print("check balance function called.")
def printMessage(self, output):
# clearing the frame
for widget in Frame1_1_2.winfo_children():
[Link]()
# getting output_message and displaying it in the frame
output_message = Label(Frame1_1_2, text=output, background="#fffffe")
output_message.pack(pady=20)
def printMessage_outside(output):
# clearing the frame
for widget in Frame1_1_2.winfo_children():
[Link]()
# getting output_message and displaying it in the frame
output_message = Label(Frame1_1_2, text=output, background="#fffffe")
output_message.pack(pady=20)
class depositMoney:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+519+278")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Deposit money")
p1 = PhotoImage(file='./images/deposit_icon.png')
[Link](True, p1)
[Link](borderwidth="2")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 9", foreground="#000000",
borderwidth="0",
text='''Enter amount to deposit :''')
[Link](relx=0.146, rely=0.171, height=21, width=164)
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black",
selectforeground="#ffffffffffff")
[Link](relx=0.535, rely=0.171, height=20, relwidth=0.253)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", borderwidth="0",
foreground="#ffffff",
highlightbackground="#000000",
highlightcolor="black", pady="0", text='''Proceed''',
command=lambda: [Link]([Link]()))
[Link](relx=0.56, rely=0.598, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", font="-family {Segoe UI} -size 9",
foreground="#ffffff",
highlightbackground="#d9d9d9", borderwidth="0",
highlightcolor="black", pady="0",
text='''Back''',
command=[Link])
[Link](relx=0.268, rely=0.598, height=24, width=67)
def submit(self, amount):
if [Link]():
if 25000 >= float(amount) > 0:
output = transaction(customer_accNO, float(amount), 1)
else:
Error(Toplevel([Link]))
if float(amount) > 25000:
[Link](self, message_shown="Limit exceeded!")
else:
[Link](self, message_shown="Positive value expected!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid amount!")
return
if output == -1:
Error(Toplevel([Link]))
[Link](self, message_shown="Transaction failed!")
return
else:
output = "Amount of rupees " + str(amount) + " deposited successfully.\nUpdated
balance : " + str(output)
customerMenu.printMessage_outside(output)
[Link]()
def back(self):
[Link]()
class withdrawMoney:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+519+278")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Withdraw money")
p1 = PhotoImage(file='./images/withdraw_icon.png')
[Link](True, p1)
[Link](borderwidth="2")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3",
font="-family {Segoe UI} -size 9", foreground="#000000",
text='''Enter amount to withdraw :''')
[Link](relx=0.146, rely=0.171, height=21, width=164)
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black",
selectforeground="#ffffffffffff")
[Link](relx=0.535, rely=0.171, height=20, relwidth=0.253)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", borderwidth="0",
foreground="#ffffff",
highlightbackground="#000000",
highlightcolor="black", pady="0", text='''Proceed''',
command=lambda: [Link]([Link]()))
[Link](relx=0.56, rely=0.598, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", borderwidth="0", font="-family
{Segoe UI} -size 9",
foreground="#ffffff",
highlightbackground="#d9d9d9", highlightcolor="black", pady="0",
text='''Back''',
command=[Link])
[Link](relx=0.268, rely=0.598, height=24, width=67)
def submit(self, amount):
if [Link]():
if 25000 >= float(amount) > 0:
output = transaction(customer_accNO, float(amount), 2)
else:
Error(Toplevel([Link]))
if float(amount) > 25000:
[Link](self, message_shown="Limit exceeded!")
else:
[Link](self, message_shown="Positive value expected!")
return
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid amount!")
return
if output == -1:
Error(Toplevel([Link]))
[Link](self, message_shown="Transaction failed!")
return
else:
output = "Amount of rupees " + str(amount) + " withdrawn successfully.\nUpdated
balance : " + str(output)
customerMenu.printMessage_outside(output)
[Link]()
def back(self):
[Link]()
class changePIN:
def __init__(self, window=None):
[Link] = window
[Link]("411x111+505+223")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Change PIN")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter new PIN:''')
[Link](relx=0.243, rely=0.144, height=21, width=93)
self.Label2 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Confirm PIN:''')
[Link](relx=0.268, rely=0.414, height=21, width=82)
self.Entry1 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.528, rely=0.144, height=20, relwidth=0.229)
self.Entry2 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.528, rely=0.414, height=20, relwidth=0.229)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text='''Proceed''',
command=lambda: [Link]([Link](), [Link]()))
[Link](relx=0.614, rely=0.721, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text="Back", command=[Link])
[Link](relx=0.214, rely=0.721, height=24, width=67)
def submit(self, new_PIN, confirm_new_PIN):
if new_PIN == confirm_new_PIN and str(new_PIN).__len__() == 4 and
new_PIN.isnumeric():
change_PIN(customer_accNO, new_PIN)
[Link]()
else:
Error(Toplevel([Link]))
if new_PIN != confirm_new_PIN:
[Link](self, message_shown="PIN mismatch!")
elif str(new_PIN).__len__() != 4:
[Link](self, message_shown="PIN length must be 4!")
else:
[Link](self, message_shown="Invalid PIN!")
return
def back(self):
[Link]()
class closeAccount:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+498+261")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Close Account")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter your PIN:''')
[Link](relx=0.268, rely=0.256, height=21, width=94)
self.Entry1 = [Link](window, show="*", background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.511, rely=0.256, height=20, relwidth=0.229)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text='''Proceed''',
command=lambda: [Link]([Link]()))
[Link](relx=0.614, rely=0.712, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text="Back", command=[Link])
[Link](relx=0.214, rely=0.712, height=24, width=67)
def submit(self, PIN):
print("Submit pressed.")
print(customer_accNO, PIN)
if check_credentials(customer_accNO, PIN, 2, False):
print("Correct accepted.")
delete_customer_account(customer_accNO, 2)
[Link]()
CustomerLogin(Toplevel([Link]))
else:
print("Incorrect accepted.")
Error(Toplevel([Link]))
[Link](self, message_shown="Invalid PIN!")
def back(self):
[Link]()
customerMenu(Toplevel([Link]))
class checkAccountSummary:
def __init__(self, window=None):
[Link] = window
[Link]("411x117+498+261")
[Link](120, 1)
[Link](1370, 749)
[Link](0, 0)
[Link]("Check Account Summary")
[Link](background="#f2f3f4")
self.Label1 = [Link](window, background="#f2f3f4",
disabledforeground="#a3a3a3", foreground="#000000",
text='''Enter ID :''')
[Link](relx=0.268, rely=0.256, height=21, width=94)
self.Entry1 = [Link](window, background="#cae4ff",
disabledforeground="#a3a3a3", font="TkFixedFont",
foreground="#000000", insertbackground="black")
[Link](relx=0.511, rely=0.256, height=20, relwidth=0.229)
self.Button1 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text='''Proceed''',
command=lambda: [Link]([Link]()))
[Link](relx=0.614, rely=0.712, height=24, width=67)
self.Button2 = [Link](window, activebackground="#ececec",
activeforeground="#000000", background="#004080",
disabledforeground="#a3a3a3", foreground="#ffffff",
borderwidth="0",
highlightbackground="#d9d9d9",
highlightcolor="black", pady="0", text="Back", command=[Link])
[Link](relx=0.214, rely=0.712, height=24, width=67)
def back(self):
[Link]()
def submit(self, identity):
if not is_valid(identity):
[Link](identity)
else:
Error(Toplevel([Link]))
[Link](self, message_shown="Id doesn't exist!")
return
[Link]()
root = [Link]()
top = welcomeScreen(root)
[Link]()
# Tkinter GUI code ends.
OUTPUT
ADMIN SECTION :-
CUSTOMER SECTION :-
To Close Customer’s Account (From Admin’s End):-
To Close Your Account (From Customer’s End):-
BIBLIOGRAPHY
BOOKS:
SUMITA ARORA-INFORMATION PRACTICES
(PYTHON)
ARIHANT – ALL IN ONE INFORMATICS
PRACTICES (CBSE)
INTERNET:
WEBSITE: [Link]
WEBSITE:[Link]
WEBSITE:[Link]