0% found this document useful (0 votes)
13 views107 pages

Sample Project Report

dsg

Uploaded by

viveksingh446848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views107 pages

Sample Project Report

dsg

Uploaded by

viveksingh446848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 107

Banking Management

System
By Using Python and
Tkinter
Library
A PROJECT REPORT

Submitted By

Ritesh Kumar Saha


&
Sayan Das

Under the Project Guidance of

Lakhan Mahato
At
Ardent ComputechPvt. Ltd.
(ISO9001:2015)
SDF Building, Module #132, Ground Floor, Salt Lake City, GP Block, Sector V, Kolkata,
West Bengal 700091

(Note: All entries of the proforma of approval should be filled up with


appropriate and complete information. Incomplete proforma of approval in any
respect will be summarily rejected.)

(1) TITLE OF THE PROJECT:- Banking Management


System

(2) PROJECT MEMBER:- Ritesh Kumar Saha,Sayan Das

(3) NAME OF THE GUIDE:- MR. LAKHAN MAHATO

(4) ADDRESS:- Ardent CompuTech Pvt. Ltd


(An ISO 9001:2015
Certified)SDF Building,
Module #132, Ground Floor,
Salt Lake City, GP Block,
Sector V, Kolkata, West
Bengal, 700091

Project Version Control History: -

Version Author Description of Date


Version Completed
Final Ritesh Project Report
kumar
saha
04/08/2023
Sayan
Das

DECLEARATION

I hereby declare that the project work being presented in the


project proposal entitled “Banking Management System” in
partial fulfillment of the requirements for the award of the degree
of DIPLOMA in COMPUTER SCIENCE & TECHNOLOGY at
ARDENT COMPUTECH PVT. LTD, SALTLAKE, KOLKATA,
WEST BENGAL, is an authentic work carried out under the
guidance of MR. Lakhan Mahato. The matter embodied in this
project work has not been submitted elsewhere for the award of
any degree of our knowledge and belief.

DATE:-

Name of Student Signature


BONAFIDE CERTIFICATE

This is to certify that this proposal of project entitled


“Banking Management System” is a record of
bonafide work, carried out by Sayan Das and Ritesh
kumar Saha under my guidance at ARDENT
COMPUTECH PVT LTD. In my opinion, the report in its
present form is in partial fulfillment of the requirements
for the award of the degree of DIPLOMA and as per
regulations of the ARDENT®. To the best of my
knowledge, the results embodied in this report, are
original in nature and worthy of incorporation in the
present version of the report.

Guide / Supervisor

MR. Lakhan Mahato


Project Engineer

Ardent CompuTech Pvt. Ltd (An ISO 9001:2015


Certified)
SDF Building, Module #132, Ground Floor, Salt Lake City, GP Block, Sector V,
Kolkata, West Bengal 700091

ACKNOWLEDGEMENT
Success of any project depends largely on the
encouragement and guidelines of many others. I take
this sincere opportunity to express my gratitude to the
people who have been instrumental in the successful
completion of this project work.

I would like to show our greatest appreciation to Mr.


Lakhan Mahato, Project Engineer at Ardent, Kolkata. I
always feel motivated and encouraged every time by his
valuable advice and constant inspiration; without his
encouragement and guidance this project would not
have materialized.

Words are inadequate in offering our thanks to the other


trainees, project assistants and other members at
Ardent CompuTech Pvt. Ltd. for their encouragement
and cooperation in carrying out this project work. The
guidance and support received from all the members
was vital for the success of this project.
INDEX
Sl.No Topic Page No

1. Abstract 5

2. Introduction 6

3. Problem Definition 7
4. Project Goal 7

5. Methodology 8-12

6. Project Objective 12

7. Project Architecture(Workflow) 13

8. Project Implementation 14

9. Step-by-Step Working 15-21

10. Project Limitations 22

11. Future Scope 23

12. Summary 24

13. Bibliography 25

14. Project Code 26-91

ABSTRACT
Our project Banking Management system includes
‘computerized the process. Our software has the facility
to give a unique id for every user & admin and stores
the details of every number. The data can be retrieved
easily. The interface is very User-friendly. The data are
well protected using OTP verification for personal use
and makes the data processing very fast.

INTRODUCTION
This project is aimed to automate the banking management
system. This project is developed mainly to administrate and
user records. The purpose of the project entitled as to
computerize the Front Office Management of user and
administrate records in banking to develop software which
is user friendly, simple, fast and cost-effective. Traditionally,
it was done manually. The main function of the system is to
register and store user and administrate details, retrieve
and these details as and when required, and also to
manipulate these details meaningfully. Banking
management system is an environment where some of the
process of the user in the administrator is managed. It is
done through the automated computerized method.
Conventionally this system is done using papers, file and
binders. This system saves the time of the user and of the
administrator. It includes process like registration of the
user’s details and administrator’s details, assigning the
department based on their account and maintenance of the
record. This system reduces the cost and workforce required
for this job. As the system is online the information is
globally present to everyone. This makes the system easy to
handle and feasible for finding the omission with updating at
the same time. As for the existing system, they use to
maintain their record manually which makes it vulnerable to
security. If filed a query to search or update in a manual
system, it will take a lot of time to process the query and
make a report which is a tedious job. As the system used in
the bank is outdated as it requires paper, files and the
binders, which will require the human workforce to maintain
them. To get registered in the bank, a user in this system
one should come to the admin. Get the forms from the
counter while standing in the queue which consumes a lot of
the user’s time as well as of management team. As the
number of the user increases in the bank manually
managing the strength becomes a hectic job for the
administrator. This computerized system storeall the data in
the database which makes it easy to fetch and update
whenever needed.

PROBLEM DEFINITION
Using manual system to manage the users which are
records all information. The record in the have a
possibility missing or destroy when happen any accident.
So through this you can correct all the information of
weather user and admin’s together and keep it in one
place. user and admin’s data is collected through many
applications of modern age but these have not come in
the market so I made it as my goal so that user and
admin data can be easily saved through the application.
This will allow you to get new user & admin and their
updates and delete them and you will be able to see the
data of all the user’s at once and you will have no
difficulty in finding the users if you want. It will also be
very helpful for the admin to keep the data of all the
user.

PROJECT GOAL
The goal is to collect the data of any user or admin’s
together and find them easily so that the data of the
user admin’s is never lost. Here you can add new users
or admin’s, update their details and delete them. After
all the data is filled and submitted, the user & admin's
data is saved in a database which can be found
someday. The system will be used in bank to get the
information from the user or admin’s and then storing
that data for future usage.

METHODOLOGY
This project methodology is needed to make sure the
project that consists of software development will be
developed systematically in order to acquire a better
result. The overall of the project methodology is shown
as figure below.

Methodology of Banking information system


The methodology is divided to four main components
which are literature review, database design, creating a
Graphical user interface (GUI) and finally is the software
testing.

 Literature review :-
The project begins with literature review where the
overview of the project needs to be known. The
literature review is done by finding out numbers of
lectures student and class provided, involved for Faculty
of Electronics and Computer Engineering (FKEKK), how
many class and how many lecturers contribute to this
faculty. All this information needto be known in order to
provide information inside the software that is useful in
arranging the database.
 Database design :-
Database is required to improve the functionality of this
project. Therefore, the first stage of software
development is to create the database. Database is a
body of information made up of related pieces of data
organized so that they can be easily been manipulated
by the computer. As for the software development, it is
important to have database as all the information
needed can be saved for future used.
 Creation of suitable Graphic user interface (GUI) :-
GUI is a way to interact with a computer using pictures
and other visual elements displayed on a computer
screen. The pictures and buttons used to control many
Internet sites are an example of a GUI. GUI is important
to make the user easy to understand what they need to
do in order to use the software GUI must be user friendly
and easy to be understood. In order to make the GUI
function, Microsoft Visual Studio coding must be inserted
to make the software work properly.
 Software testing :-
Software testing is the process used to measure the
quality of developed computer software to determine
that the software meets its required results. This testing
process of executing a program is intended of finding
errors.
 Requirement plan phase :-
Before developing the system, either small or large
system the proper planning needs to be put in the first
place. This is to make sure that all the activities that will
execute and overall development are under control. The
purpose of planning is to prepare the workflow for
project management start from early stages of project
development until end of development. The developer
need to mention that it is very important to divide the
project into subtasks to make sure about time
estimation and to identify source requirement to
complete this Banking Information System project.

 Requirement specification analysis phase :-


All the requirement analysis phase will be started after
the study case for this system has been completed.
Through this phase, developer will determine clearly who
will use the system, function of the system, when and
where the system will be executed. Developer will begin
the study from existing system to define the strength
and weakness. This is important as it can identify the
opportunities to improve the existing system to a new
system. If there are any shortcomings or defects, it can
be corrected in the new system. After this research, the
concept of new system is developed. Besides, the
information is collected by using factfinding techniques
such as background reading, interviewing and
observation. As a developer, it needs to analyse the
feasibility of new system, which is to improve the system
as to make sure that the new system will fulfil the user
requirement. All the constraints and limitation of the new
system also need to analyse.
 Design phase :-
Design phase started after the specification and analysis
phase completed. In this step, specified technical designs
were created to the smallest detail. It is common for
several alternative solutions to be identified, but only one
must ultimately be chosen as the best of the system and
users. Trade-off may become part of the reality for the
project, which may include time, scopes and
functionality. The purpose of the system designing is to
create a blueprint for the new system that will satisfy all
documented requirements. There are several things to
identify during system designing such as all necessary
outputs, inputs, interfaces and processes. Furthermore,
for this phase, optimal solution of the designing was
developed. The main objects for the system and
relationship between object are well defined to make
sure that there will be an interaction on it, so that all the
objects need to classify on their own classes. Other than
that, the attribute of class also was defined.
Also in this phase, there are few designing, which applied
into new system such as database design, interface
design and coding design.

 Database design :-
To design database, it considers and concerns in many
aspects. The specification will be determined by what is
the data need to be stored in database. In database
design, each step of the process needs to be done very
carefully for avoiding any unexpected errors. The errors
might occur in database, it can give complex problem for
the system. These databases are designed by using
Microsoft Access 2003. For Student Information System
database, there are seven tables involved such as
student, lecturer, activity, position, and class, list of
student and list of lecturer.
 Interface design :-
The purpose of interface design is to determine how the
layout of the system and to make sure that this layout
suitable with user requirement. The good designing can
attract the users and supposedly not confused the users
with each functions of the system. For instance, the
developer also needs to concern about user-friendly
interface during designing phase. Through this system,
there are some elements, which been used to design the
interface.
 Coding design :-
This coding designing showed how programming
language would be implemented. It also will explain the
purpose for each coding development. SQL statement is
used in order to make sure that interfaces can be
connected with database.
 RAD (Rapid Application Design) Methodology :-
This Banking Information System development used RAD
(Rapid Application Design) methodology. This
methodology method follows the System Development
Life Cycle (SDLC) that in a sequential and structured
away. RAD is a methodology for compressing the
analysis, design, build, and test phases into a series of
short, iterative development cycles. This has a number of
distinct advantages over the traditional sequential
development model. Iteration allows for effectiveness
and self-correction. Studies have shown that human
beings almost never perform a complex task correctly
the first time. However, people are extremely good at
making an adequate beginning and then making many
small refinements and improvements. RAD projects are
typically operated with small-integrated teams
comprised of developers, end users, and IT technical
resources. Small teams, combined with short, iterative
development cycles optimize speed, unity of vision and
purpose, effective informal communication and simple
project management.
Banking Management System use case diagram for admin roles

Banking Management System use case diagram for user roles

PROJECT OBJECTIVE
The main objective of our project is to successfully
complete the Banking Management System and whether
users and admin’s are being helped through this should
be well noticed.

PROJECT
ARCHITECTURE(WORKFLOW)
This is the detailed work architecture where we are
showing the process of Banking Management System.

PROJECT IMPLEMENTATION

INPUT PROCESSING OUTPUT

INFORMATION
DATA INFORMATION
SYSTEM
Information system
Information systems contain information about important
people, places and things within the organization or in
the environment surrounding it. Information is a data
that have been designed into a form that is meaningful
and useful to human beings. Data, in contrast, are
streams of raw facts re-presenting events occurring in
organizations or the physical environment before they
have been organized into a form that people can
understand and use.

STEP-BY-STEP WORKING

 Banking Management System Front page:-

After running the Python program the user & admin


Information Form will open and here two bu ttons have
been created User login and Admin login.
 After running the Front page the user login Form will
open and here three buttons have been created use
right user id and password then submit and you will go
to log in page.
 Or you have to remember user id and forgot
password and have some questions to forgot password
should match with creating time details .
 Or you don’t have account then create an account
secure with otp system .
 After running the Front page the admin login Form
will open and here three buttons have been created
use right admin id and password then submit and you
will go to log in page, forgot password as same as user
login.
 But some change in the create a new admin page
 Admin log in page

 New user can add by admin

 Remove user to search account then delete


 Update the user informatation

1st choose account number


2nd choose what you want to update

3rd Change what you choose


 View all user

 Transaction

1st Enter account number


2nd deposite or withdraw balance

PROJECT LIMITATIONS

• Software is limited to Desktop only.


• System requires python interpreter installed on the
system.
• All opinions of banking management are not
included in current version. Security options provide
only mid level security against beginner attackers.

• GUI is in English only.


FUTURE SCOPE
• This software can be made for all OS.
• Higher Security features can be included in this
software.
• Program scheduling can also be included in this
software.
• This software can be developed to use as tutorial to
teach basic concepts of OS to new users.
• This software can be implemented with OS to reduce
overhead of installing and running interface of each
and every tool at different place.
• Automatic Shutdown through SMS can be
implemented in this.
SUMMARY
This documentation outlines the procedure of Banking
Management System By Using Python and Tkinter Library
provided by Ardent
ComputechPvt. Ltd. The steps include –

• Completing the research required.


• Building the project and testing.
• Presenting the project in the form of a report.

The project titled “Banking Management System” is


developed using Python Tkinter as front end and MYSQL
database in back end to computerize the process of
management of banking records. This project covers only
the basic features required.
BIBLIOGRAPHY

1. http://practice.geeksforgeeks.org
2. www.tutorialpoint.com
3. http://stackoverflow.com
PROJECT CODE

from tkinter import *


from PIL import Image, ImageTk

def homePage():
def adminLogin():
window.destroy()
from AdminLogin import adminLogin
adminLogin()

def userLogin():
window.destroy()
from UserLogin import userLogin
userLogin()

window = Tk()
window.geometry("1000x650+200+30")

window.maxsize(1000,650)
window.minsize(1000,650)

window.title("Banking Management System")


window.config(background = "ivory")
#header nab bar
nab = Frame(window, bg = "#102762", width = 1000,
height = 100)
nab.place(x = 0, y = 0)

#Gitaram logo
'''
logo = PhotoImage(file = "4.png")
logo = Label(image = logo)
logo.place(x = 0, y = 18)
'''
logo = Image.open("1.png")
rLogo = logo.resize((140,106))
oLogo = ImageTk.PhotoImage(rLogo)

fLogo = Label(image = oLogo, bg = "#102762")


fLogo.place(x = 0, y = 0)

lBankName = Label(nab,text = "SR Bank",fg =


"white", bg = "#102762", font = ("times new roman",
40, "bold"))
lBankName.place(x = 140, y = 18)

bAdminLogin = Button(nab, text = "Admin Login", bg


= "blue", fg = "white", font = ("times new roman", 20,
"bold"), command = adminLogin)
bAdminLogin.place(x = 794, y = 25)

bUserLogin = Button(nab, text = "User Login", bg =


"blue", fg = "white", font = ("times new roman", 20,
"bold"), command = userLogin)
bUserLogin.place(x = 614, y = 25)

#Create Image
img = Image.open("5.png")
rImg = img.resize((1000,550))
oImg = ImageTk.PhotoImage(rImg)

fImg = Label(image = oImg, border=0)


fImg.place(x = 0, y = 100)

window.mainloop()

if __name__ == '__main__':
homePage()
#-----------------------------------------------------------------------------
-----------------------------------
from tkinter import *
from tkinter import ttk
from PIL import Image, ImageTk
import sqlite3
from MsgBox import msgBox

def adminInterface(adminId):
db = sqlite3.connect("BankDB.db")
cr = db.cursor()

# fetch admin name


cr.execute("select name from admin where
adminId = ?",(adminId,))
name = cr.fetchall()[0][0]

# fetch all user's data for ViewAllUser


cr.execute("select accountNo, name, address
from user")
allUser = cr.fetchall()

def home():
fRemoveUser.place_forget()
fTransaction.place_forget()
fFindUser.place_forget()
fViewAllUser.place_forget()
fUpdateUser.place_forget()
fUpdateUserNext.place_forget()
fAccount.place_forget()
fSelect.place_forget()
fNext.pack_forget()

def addUser():
from UserRegistration import userRegistration
userRegistration()

def removeUser():
home()
fRemoveUser.place(x = 250, y = 176)

def close():
home()

def delete():
db = sqlite3.connect("BankDB.db")
cr = db.cursor()
lvAccountNo = eAccountNo.get()
cr.execute("select accountNo from user
where accountNo = ?", (lvAccountNo,))

try:
acc = cr.fetchone()[0][0] # if arrise error
then account no is not exist
concenmentMsg = Toplevel()
concenmentMsg.title("Warning !!!")

concenmentMsg.config(background="red")

concenmentMsg.geometry("150x120+550+300")
concenmentMsg.minsize(250,120)
concenmentMsg.maxsize(250,120)
lSurity = Label(concenmentMsg, text =
"Are you sure ?",bg = "red", fg = "white", font =
("times new roman", 20, "bold"))

lSurity.pack(pady = 10)

def yes():
concenmentMsg.destroy()
cr.execute("delete from user where
accountNo = ?", (lvAccountNo,))
db.commit()
msgBox("Account No. is Deleted
successfully",450,1)
def no():
concenmentMsg.destroy()

frame = Frame(concenmentMsg, bg =
"red", width = 300, height = 50)
frame.pack()
bYes = Button(frame, text = "Yes", width
= 5, bg = "cyan", font = ("times new roman", 15,
"bold"), command = yes)
bYes.pack(side = "left", pady = 10,
padx=10, fill = X)
bNo = Button(frame, text = "No", width =
5, bg = "cyan", font = ("times new roman", 15,
"bold"), command = no)
bNo.pack(side = "left",pady = 10,
padx=10, fill = Y)

except:
msgBox("Account No. is not
exist !!!",350,1)

'''def clearEntry(): # textvar = gvAccountNo in


bDelete
gvAccountNo.set("")'''

#gvAccountNo = StringVar()
lAccountNo = Label(fRemoveUser, text =
"Account No", bg = "beige", fg = "blue", font =
("times new roman", 20, "bold"))
lAccountNo.place(x = 100, y = 50)
eAccountNo = Entry(fRemoveUser, font =
("times new roman", 20, "bold"), border = 2)
eAccountNo.place(x = 300, y = 50)

bDelete = Button(fRemoveUser, text = "Delete


User", width = 10, bg = "blue", fg = "white", font =
("times new roman", 20, "bold"), command =
delete)
bDelete.place(x = 170, y = 315)

bclose = Button(fRemoveUser, text = "Close",


width = 10, bg = "blue", fg = "white", font = ("times
new roman", 20, "bold"), command = close)
bclose.place(x = 370, y = 315)

def updateUser():
home()
fUpdateUserNext.place_forget()
fUpdateUser.place(x = 250, y = 150)

fAccount.place(x = 0, y = 0)

lAccountNo = Label(fAccount, text = "Account


No", bg = "beige", fg = "blue", font = ("times new
roman", 20, "bold"))
lAccountNo.place(x = 100, y = 50)

eAccountNo = Entry(fAccount, font = ("times


new roman", 20, "bold"), border = 2)
eAccountNo.place(x = 300, y = 50)

def accNext():
try:
cr.execute("select accountNo from user
where accountNo = ?",(eAccountNo.get(),))
accountUpdate = cr.fetchall()[0][0]
fAccount.place_forget()
fSelect.place(x = 0, y = 0)
except:
msgBox("Invalid Account No",350,1)

bAccNext = Button(fAccount, text = "Next",


font = ("times new roman", 20, "bold"), width = 8,
bg = "blue", fg = "white", command = accNext)
bAccNext.place(x = 290, y = 380)

lTitle = Label(fSelect, text = "Select which You


want to Update", font = ("times new roman", 25,
"bold"), bg = "beige", fg = "blue")
lTitle.place(x = 100, y = 20)

# create checkbox
vName = IntVar(fSelect)
cName = Checkbutton(fSelect, text = "Name",
variable = vName, font = ("times new roman", 15,
"bold"), bg = "beige", fg = "blue")
cName.place(x = 150, y = 100)

vGuardianName = IntVar(fSelect)
cGuardianName = Checkbutton(fSelect, text =
"Guardian Name", variable = vGuardianName, font
= ("times new roman", 15, "bold"), fg = "blue", bg =
"beige")
cGuardianName.place(x = 150, y = 150)

vAddress = IntVar(fSelect)
cAddress = Checkbutton(fSelect, text =
"Address", variable = vAddress, font = ("times new
roman", 15, "bold"), fg = "blue", bg = "beige")
cAddress.place(x = 150, y = 200)

vCity = IntVar(fSelect)
cCity = Checkbutton(fSelect, text = "City",
variable = vCity, font = ("times new roman", 15,
"bold"), fg = "blue", bg = "beige")
cCity.place(x = 150, y = 250)

vState = IntVar(fSelect)
cState = Checkbutton(fSelect, text = "State",
variable = vState, font = ("times new roman", 15,
"bold"), fg = "blue", bg = "beige")
cState.place(x = 150, y = 300)

vPin = IntVar(fSelect)
cPin = Checkbutton(fSelect, text = "Pin No",
variable = vPin, font = ("times new roman", 15,
"bold"), fg = "blue", bg = "beige")
cPin.place(x = 400, y = 100)

vCountry = IntVar(fSelect)
cCountry = Checkbutton(fSelect, text =
"Country", variable = vCountry, font = ("times new
roman", 15, "bold"), fg = "blue", bg = "beige")
cCountry.place(x = 400, y = 150)

vBranch = IntVar(fSelect)
cBranch = Checkbutton(fSelect, text =
"Branch", variable = vBranch, font = ("times new
roman", 15, "bold"), fg = "blue", bg = "beige")
cBranch.place(x = 400, y = 200)

vMobile = IntVar(fSelect)
cMobile = Checkbutton(fSelect, text = "Mobile
No", variable = vMobile, font = ("times new roman",
15, "bold"), fg = "blue", bg = "beige")
cMobile.place(x = 400, y = 250)

vEmail = IntVar(fSelect)
cEmail = Checkbutton(fSelect, text = "Email
Id", variable = vEmail, font = ("times new roman",
15, "bold"), fg = "blue", bg = "beige")
cEmail.place(x = 400, y = 300)

def next():
fSelect.place_forget()
fUpdateUserNext.place(x = 250, y = 150)
fNext.pack()

# determine which fields are selected if


Name is selectd then vName.get() wil be 1
selected = {"Name" : vName.get(),
"Guardian Name" : vGuardianName.get(), "Address"
: vAddress.get(), "City" : vCity.get(), "State" :
vState.get(), "Pin No" : vPin.get(), "Country" :
vPin.get(), "Branch" : vBranch.get(), "Mobile No" :
vMobile.get(), "Email Id" : vEmail.get()
}

labels = []
entrys = []

s = [StringVar() for i in selected]


r = 0 # for count index of s and it will help to
put the exact values in table attribute
xLabel = 160
xEntry = 340
yAx = 5
for i in selected:
if selected[i]:
labels.append(Label(fNext, text = i,
width = 12, font = ("times new roman", 15, "bold"),
bg = "beige", fg = "blue"))
labels[r].place(x = xLabel, y = yAx)

entrys.append(Entry(fNext, font =
("times new roman", 15, "bold"), textvar = s[r]))
entrys[r].place(x = xEntry, y = yAx)

yAx += 30
r += 1

def UpdatePlaceForget():
r=0
for i in selected:
if selected[i]:
labels[r].place_forget()
entrys[r].place_forget()
r += 1

tableAttributes = ["name", "guardianName",


"address", "city", "state", "pin", "country",
"branchName", "mobileNo", "emailId"]

def updateCheck():
r=0
blankEntry = False
for i in selected:
if selected[i]:
if entrys[r].get() == "":
blankEntry = True
r += 1
if blankEntry:
msgBox("Please fill all the Box",350,1)
else:
updateDb()

def updateDb():
fNext.pack_forget()
UpdatePlaceForget()
bUpdate.pack_forget()
r=0
for i in selected:
if selected[i]:
print(s[r].get(), "s")
r += 1
r=0
for i in selected:
if selected[i]:
cr.execute(f"update user set
{tableAttributes[r]} = ? where accountNo = ?",
(s[r].get(),eAccountNo.get()))
r += 1
db.commit()
msgBox("Account is Updated
successfully",400,1)
home()
bUpdate = Button(fNext, text = "Update",
bg = "blue", fg = "white", width = 12, font = ("times
new roman", 15, "bold"), command = updateCheck)
bUpdate.place(x = 270, y = 400)

bNext = Button(fSelect, text = "Next >", font =


("times new roman", 20, "bold"), bg = "blue", fg =
"white", command = next)
bNext.place(x = 300, y = 380)

def findUser(): # enter to search user interface


home()
def search(): #search for find user's details
fTransaction.place_forget()

cr.execute("select accountNo from user


where accountNo = ?", (eFindUser.get(),))

lvAccountNo = cr.fetchall()

if lvAccountNo == []:
msgBox("Account No is not exists",400,1)
else:
cr.execute("select * from user where
accountNo = ?", (eFindUser.get(),))
userDetails = cr.fetchall()[0]
listUserDetails.delete(0,"end")
j=0
for i in userDetails:
listUserDetails.insert(j+1,
str(userFields[j]) + " : " + str(i))
j = j+1
eFindUser = Entry(fFindUser, font = ("times
new roman", 20, "bold"), width = 28)

bSearch = Button(fFindUser, text = "Search",


font = ("times new roman", 15, "bold"), bg = "blue",
fg = "white", command = search)

# Define list for show user's information


listUserDetails = Listbox(fFindUser, width = 48,
height = 10, font = ("times new roman", 15))

# Insert user's information in list box


userFields = ["NAME", "GUARDIAN NAME",
"RELATION WITH GUARDIAN" , "DOB" ,
"GENDER","MARITALSTATUS", "CASTE", "RELIGION",
"ADDRESS", "CITY", "STATE", "PIN",
"COUNTRY",'ANNUAL INCOME', "OCCUPATION",
"BRANCHNAME","BALANCE", "ACCOUNT NO",
"ACCOUNT TYPE","CUSTOMER ID", "MOBILE NO",
"EMAIL ID", "PAN NO", "AADHAR NO", "USER ID",
"PASSWORD"]

def click(event):
eFindUser.config(state = NORMAL)
eFindUser.delete(0,"end")

eFindUser.insert(0,"Enter Account No")


eFindUser.config(state = DISABLED)
eFindUser.bind("<Button-1>", click)

fFindUser.place(x = 250, y = 176)


eFindUser.place(x= 100 ,y = 20)
bSearch.place(x = 510, y = 19)
listUserDetails.place(x = 100, y = 80)

def transaction():
'''
eFindUser.place_forget()
bSearch.place_forget()
listUserDetails.place_forget() = fFindUser
fFindUser.place_forget()'''
home()

fTransaction.place(x = 250, y = 176)

lAcountNo = Label(fTransaction, text =


"Account No", bg = "beige", fg = "blue", font =
("times new roman", 20, "bold"))
lAcountNo.place(x = 100, y = 20)

def getBalance(event):
try:
eBalance.destroy()
except:
print("not bal")
cr.execute("select openingBalance from user
where accountNo = ?", (eAccountNo.get(),))

lBalance = Label(fTransaction, text =


"Available Balance", bg = "beige", fg = "blue", font
= ("times new roman", 20, "bold"))
lBalance.place(x = 190, y = 150)
eBalance = Entry(fTransaction, width = 15,
border = 0, bg = "beige", font = ("times new
roman", 20, "bold"))
eBalance.place(x = 420, y = 150)
try:
eBalance.delete(0,END)
eBalance.insert(0, int(cr.fetchall()[0][0]))
except:
pass
eBalance.config(state = "disabled", bg =
"beige")

eAccountNo = Entry(fTransaction, font =


("times new roman", 20, "bold"))# ,textvar =
gvAccountNo
eAccountNo.place(x = 300, y = 20)
eAccountNo.bind("<FocusOut>",getBalance)

lAmount = Label(fTransaction, text =


"Amount", bg = "beige", fg = "blue", font = ("times
new roman", 20, "bold"))
lAmount.place(x = 100, y = 70)

eAmount = Entry(fTransaction, font = ("times


new roman", 20, "bold")) # ,textvar = gvAmount
eAmount.place(x = 300, y = 70)

'''def clear():
gvAccountNo.set("")
gvAmount.set("")'''

def deposit():
cr.execute("select openingBalance from user
where accountNo = ?", (eAccountNo.get(),))
bal = int(cr.fetchall()[0][0])
accountNo = eAccountNo.get()
amount = eAmount.get()
if amount == "" or accountNo == "":
msgBox("Please enter Account No and
amount",460,1)
else:
amount = str(bal+int(amount))

concenmentMsg = Toplevel()
concenmentMsg.title("Warning !!!")

concenmentMsg.config(background="red")

concenmentMsg.geometry("150x120+550+300")
concenmentMsg.minsize(250,120)
concenmentMsg.maxsize(250,120)
lSurity = Label(concenmentMsg, text =
"Are you sure ?",bg = "red", fg = "white", font =
("times new roman", 20, "bold"))

lSurity.pack(pady = 10)

def yes():
concenmentMsg.destroy()
cr.execute("update user set
openingBalance = ? where accountNo = ?",
(amount, accountNo))
db.commit()
msgBox(f"Deposite is successfull",
400,1)

#clear()
def no():
concenmentMsg.destroy()

frame = Frame(concenmentMsg, bg =
"red", width = 300, height = 50)
frame.pack()
bYes = Button(frame, text = "Yes", width
= 5, bg = "cyan", font = ("times new roman", 15,
"bold"), command = yes)
bYes.pack(side = "left", pady = 10,
padx=10, fill = X)
bNo = Button(frame, text = "No", width =
5, bg = "cyan", font = ("times new roman", 15,
"bold"), command = no)
bNo.pack(side = "left",pady = 10,
padx=10, fill = Y)

def withdraw():
cr.execute("select openingBalance from user
where accountNo = ?", (eAccountNo.get(),))
bal = int(cr.fetchall()[0][0])

accountNo = eAccountNo.get()
amount = int(eAmount.get())
if amount == "" or accountNo == "":
msgBox("Please enter Account No and
amount",460,1)
else:
if bal < amount:
msgBox("Account have not enough
amount",400,1)
else:
amount = str(bal-amount)
concenmentMsg = Toplevel()
concenmentMsg.title("Warning !!!")

concenmentMsg.config(background="red")

concenmentMsg.geometry("150x120+550+300")
concenmentMsg.minsize(250,120)
concenmentMsg.maxsize(250,120)
lSurity = Label(concenmentMsg, text =
"Are you sure ?",bg = "red", fg = "white", font =
("times new roman", 20, "bold"))
#msg.place(x = 30, y = 10)
lSurity.pack(pady = 10)
def yes():
concenmentMsg.destroy()
cr.execute("update user set
openingBalance = ? where accountNo = ?", (amount
,accountNo))
db.commit()
msgBox("Withdraw is
successfull",400,1)
#clear()

def no():
concenmentMsg.destroy()

frame = Frame(concenmentMsg, bg =
"red", width = 300, height = 50)
frame.pack()
bYes = Button(frame, text = "Yes",
width = 5, bg = "cyan", font = ("times new roman",
15, "bold"), command = yes)
bYes.pack(side = "left", pady = 10,
padx=10, fill = X)
bNo = Button(frame, text = "No", width
= 5, bg = "cyan", font = ("times new roman", 15,
"bold"), command = no)
bNo.pack(side = "left",pady = 10,
padx=10, fill = Y)

bDeposit = Button(fTransaction, text =


"Deposite", width = 9, bg = "blue", fg = "white",
font = ("times new roman", 20, "bold"), command =
deposit)
bDeposit.place(x = 170, y = 340)

bWithdraw = Button(fTransaction, text =


"Withdraw", width = 9, bg = "blue", fg = "white",
font = ("times new roman", 20, "bold"), command =
withdraw)
bWithdraw.place(x = 370, y = 340)

def viewAllUser():
home() #fFindUser.place_forget()
fViewAllUser.place(x = 250, y = 176)

# style treeview
style = ttk.Style()
style.theme_use('clam')
'''
style.configure("t.Treeview", font = ("times
new roman", 50))
style.configure("t.Treeview.Heading", font =
("times new roman", 20, "bold"))'''
tViewAllUser = ttk.Treeview(fViewAllUser,
column = ("Account No", "Name", "Address"), show
= "headings", height = 18)#height means how
many record

vScrollbar = Scrollbar(fViewAllUser)
vScrollbar.pack(side = RIGHT, fill = Y)

tViewAllUser.tag_configure('odd',
background='#E8E8E8')
tViewAllUser.tag_configure('even',
background='#DFDFDF')

tViewAllUser.column("Account No", anchor =


CENTER, width = 225)
tViewAllUser.column("Name", anchor =
CENTER, width = 225)
tViewAllUser.column("Address", anchor =
CENTER, width = 225)

tViewAllUser.heading(text = "Account No",


column = "Account No")
tViewAllUser.heading(text = "Name", column =
"Name")
tViewAllUser.heading(text = "Address", column
= "Address")

for i in allUser:
tViewAllUser.insert("", "end", values = (i[0],
i[1], i[2]))

tViewAllUser.pack()
vScrollbar.config(command =
tViewAllUser.yview)
tViewAllUser.config(yscrollcommand =
vScrollbar.set)

def logOut():
window.destroy()
from HomePage import homePage
homePage() #import Banking Home Page

window = Tk()
window.geometry("1000x650+200+30")
window.config(background = "ivory")# 102762
window.title("Admin")

fWindow = Frame(window, width = 1000, height


= 650, background = "ivory") # A6D1E6
fWindow.pack()

fTop = Frame(fWindow, bg = "blue", width =


1000, height = 100) #102762
fTop.place(x = 0, y = 0)

logo = Image.open("1.png")
rLogo = logo.resize((130,106))
oLogo = ImageTk.PhotoImage(rLogo)

fLogo = Label(fWindow,image = oLogo, bg =


"blue")# 102762
fLogo.place(x = 0, y = 0)
lBankName = Label(fTop,text = "SR Bank",fg =
"white", bg = "blue", font = ("times new roman", 40,
"bold"))#102762
lBankName.place(x = 140, y = 18)

# start set Welcome admin


fWelcome = Frame (fTop, height = 100, width =
400, bg = "blue")
fWelcome.place(x = 600, y = 0)

lWelcome = Label(fWelcome, text = "Welcome",


fg = "white", bg = "blue",font = ("times new
roman", 20, "bold"))
lWelcome.place(relx = 0.5, rely = 0.3, anchor =
CENTER)

lName = Label(fWelcome, text = name, bg =


"blue", fg = "white", font = ("times new roman", 20,
"bold"))
lName.place(relx = 0.5, rely = 0.7, anchor =
CENTER)
# end set welcome admin

# Home page
hLogo =
ImageTk.PhotoImage(Image.open("1.png").resize((5
00,500)))

Label(fWindow, image = hLogo,


bg="ivory").place(x = 320, y = 150)
Label(fWindow, text = "Welcome to the Admin
Page", font = ("times new roman", 40, "bold"), bg =
"ivory", fg = "blue").place(x = 280, y = 160)

fLeft = Frame(fWindow, width = 200, height =


650, background = "ivory")#7F5283
fLeft.place(x = 0, y = 100)

# frame for View all user


fViewAllUser = Frame(fWindow, width = 700,
height = 400)

# frame for Update user


fUpdateUser = Frame(fWindow, width = 700,
height = 450, bg = "beige")

# click on next to open new frame in Update user


fUpdateUserNext = Frame(fWindow, height =
450, width = 700, bg = "beige")

# for Enter account no step in update


fAccount = Frame(fUpdateUser, height = 450,
width = 700, bg = "beige")

# for select update fields stop in update


fSelect = Frame(fUpdateUser, height = 450,
width = 700, bg = "beige")

# for go next page where user enter their correct


details in update_user
fNext = Frame(fUpdateUserNext, bg = "beige",
height = 450, width = 700)
# frame for Remove user
fRemoveUser = Frame(fWindow, width = 700,
height = 400, bg = "beige")

# Find user and using account number it is pack


in findUser function
fFindUser = Frame(fWindow, width = 700, height
= 400, bg = "beige")

# Go to deposite and withdraw Frame


bTransaction = Button(fFindUser, text =
"Transaction", font = ("times new roman", 20,
"bold"), width = 10, fg = "white", bg = "blue",
command = transaction)
bTransaction.place(x = 260, y = 340)

fTransaction = Frame(fWindow, width = 700,


height = 400, bg = "beige")

#Difference between button --- 60


bHome = Button(fLeft, text = "Home", bg =
"blue", width = 12, fg = "white", font = ("times new
roman", 20, "bold"), command = home)
bHome.place(x = 0, y = 30)

bAddUser = Button(fLeft, text = "Add User", bg =


"blue", width = 12, fg = "white", font = ("times new
roman", 20, "bold"), command = addUser)
bAddUser.place(x = 0, y = 90)

bRemoveUser = Button(fLeft, text = "Remove


User", bg = "blue", width = 12, fg = "white", font =
("times new roman", 20, "bold"), command =
removeUser)
bRemoveUser.place(x = 0, y = 150)

bUpdateUser = Button(fLeft, text = "Update


User", bg = "blue", width = 12, fg = "white", font =
("times new roman", 20, "bold"), command =
updateUser)
bUpdateUser.place(x = 0, y = 210)

bViewAllUser = Button(fLeft, text = "View All


User", bg = "blue", width = 12, fg = "white", font =
("times new roman", 20, "bold"), command =
viewAllUser)
bViewAllUser.place(x = 0, y = 270)

bFindUser = Button(fLeft, text = "Search User",


bg = "blue", width = 12, fg = "white", font = ("times
new roman", 20, "bold"), command = findUser)
bFindUser.place(x = 0, y = 330)

bTransaction = Button(fLeft, text = "Transaction",


font = ("times new roman", 20, "bold"), width = 12,
fg = "white", bg = "blue", command = transaction)
bTransaction.place(x = 0, y = 390)

bLogOut = Button(fLeft, text = "Log Out", bg =


"blue", fg = "white", width = 12, font = ("times new
roman", 20, "bold"), command = logOut)
bLogOut.place(x = 0, y = 450)

window.mainloop()
'''
if __name__ == '__main__':
adminInterface("b")
'''
#-----------------------------------------------------------------------
-----------------------------

from tkinter import *


import sqlite3

def adminLogin():

def logIn():
db = sqlite3.connect("BankDB.db")
cr = db.cursor()
lvAdminId = gvAdminId.get()
lvPassword = gvPassword.get()
cr.execute("select password from admin where
adminId = ? and password = ?",
(lvAdminId,lvPassword))
password = str(cr.fetchall())
if password[3:-4] == lvPassword and lvAdminId
!= "" and lvPassword != "":
window.destroy()
db.close()
from AdminInterface import adminInterface
adminInterface(lvAdminId) #change the
place of image at going > adminInterface > logout
> homepage
else:
from MsgBox import msgBox
msgBox("Invalid Admin Id or
Password",450,1)

def newAcc():
from AdminRegistration import
adminRegistration
adminRegistration()

window = Tk()
window.title("Admin Login")
window.geometry("540x450+400+125")
window.maxsize(540,450)
window.minsize(540,450)

fWindow = Frame (window, background = "ivory",


width = 540, height = 450)
fWindow.place(x = 0, y = 0)

lAdminId = Label(fWindow, text = "Admins Id",


font = ("times new roman",20,"bold"), bg = "ivory",
fg = "blue")
lAdminId.place(x = 50, y = 50)

lPassword = Label(fWindow, text = "Password",


font = ("times new roman", 20, "bold"), bg =
"ivory", fg = "blue")
lPassword.place(x = 50, y = 100)

#Global variable for store user input


gvAdminId = StringVar()
gvPassword = StringVar()
eAdminId = Entry(fWindow, font = ("times new
roman", 20, "bold"), border = 3, textvar =
gvAdminId)
eAdminId.place(x = 200, y = 50)

ePassword = Entry(fWindow, font = ("times new


roman", 20, "bold"), border = 3, textvar =
gvPassword)
ePassword.place(x = 200, y = 100)

bForgotPassword = Button(fWindow, text =


"forget password", font = ("times new roman", 15,
"bold"),bg = "ivory", fg = "blue", border = 0)
bForgotPassword.place(x = 200, y = 190)

blogIn = Button(fWindow, text = "LogIn", bg =


"#102762", fg = "white", font = ("times new
roman", 20, "bold"), command = logIn)
blogIn.place(x = 220, y = 230)

lLine = Label(fWindow, text =


"------------------------------------
OR------------------------------------",font = ("times new
roman",15), bg = "ivory", fg = "blue")
lLine.place(x = 0, y = 300)

bNewAcc = Button(fWindow, text = "New Admin",


bg = "green", fg = "white", font = ("times new
roman", 20, "bold"), command = newAcc)
bNewAcc.place(x = 190, y = 350)

window.mainloop()
#adminLogin()

#-----------------------------------------------------------------------
--------------------------------

from tkinter import *


from tkcalendar import DateEntry

def adminRegistration():

window = Tk()
window.geometry("1300x600+30+35")
window.title("Admin Registration")

fWindow = Frame(window, height = 600, width =


1300, background = "ivory")
fWindow.pack()

details = Label(fWindow, text = "Fill the New


Admin's details", bg = "ivory", fg = "green", font =
("times new roman",30,"bold"))
details.place(x = 424, y = 1)

#All Labels

lName = Label(fWindow, text = "Name", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lName.place(x = 80, y = 80)
lDob = Label(fWindow, text = "Date of Birth", bg
= "ivory", fg = "blue", font = ("times new roman",
17, "bold"))
lDob.place(x = 80, y = 124)

lGender = Label(fWindow, text = "Gender", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lGender.place(x = 80, y = 168)

lCaste = Label(fWindow, text = "Caste", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lCaste.place(x = 80, y = 212)

lReligion = Label(fWindow, text = "Religion", bg


= "ivory", fg = "blue", font = ("times new roman",
17, "bold"))
lReligion.place(x = 80, y =256)

lAddress = Label(fWindow, text = "Address", bg


= "ivory", fg = "blue", font = ("times new roman",
17, "bold"))
lAddress.place(x = 80, y = 300)

lCity = Label(fWindow, text = "City", bg = "ivory",


fg = "blue", font = ("times new roman", 17, "bold"))
lCity.place(x = 80, y = 344)

lState = Label(fWindow, text = "State", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lState.place(x = 80, y = 388)
lPin = Label(fWindow, text = "Pin", bg = "ivory",
fg = "blue", font = ("times new roman", 17, "bold"))
lPin.place(x = 80, y = 432)

#Labels in Right Side

lCountry = Label(fWindow, text = "Country", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lCountry.place(x = 700, y = 80)

lBranch = Label(fWindow, text = "Branch Name",


bg = "ivory", fg = "blue", font = ("times new
roman", 17, "bold"))
lBranch.place(x = 700, y = 124)

lMobile = Label(fWindow, text = "Mobile No", bg


= "ivory", fg = "blue", font = ("times new roman",
17, "bold"))
lMobile.place(x = 700, y = 168)

lEmailId = Label(fWindow, text = "Email Id", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lEmailId.place(x = 700, y = 212)

lPanNo = Label(fWindow, text = "PAN No", bg =


"ivory", fg = "blue", font = ("times new roman", 17,
"bold"))
lPanNo.place(x = 700, y = 256)
lAadharNo = Label(fWindow, text = "Aadhar No",
bg = "ivory", fg = "blue", font = ("times new
roman", 17, "bold"))
lAadharNo.place(x = 700, y = 300)

lAdminId = Label(fWindow, text = "Admin Id", bg


= "ivory", fg = "blue", font = ("times new roman",
17, "bold"))
lAdminId.place(x = 700, y = 344)

lNewPassword = Label(fWindow, text = "New


Password", bg = "ivory", fg = "blue", font = ("times
new roman", 17, "bold"))
lNewPassword.place(x = 700, y = 388)

lConfromPassword = Label(fWindow, text =


"Confrom Password", bg = "ivory", fg = "blue", font
= ("times new roman", 17, "bold"))
lConfromPassword.place(x = 700, y = 432)

#Define globalvariable for take input from entry


'''
gvName = StringVar()
gvDob = StringVar()
gvGender = StringVar()
gvCaste = StringVar()
gvReligion = StringVar()
gvAddress = StringVar()
gvCity = StringVar()
gvState = StringVar()
gvPin = StringVar()
gvCountry = StringVar()
gvBranchName = StringVar()
gvMobileNo = StringVar()
gvEmailId = StringVar()
gvPanNo = StringVar()
gvAadharNo = StringVar()
gvAdminId = StringVar()
gvNewPassword = StringVar()
gvConfromPassword = StringVar()
'''

#All Entry boxes

eName = Entry(fWindow, bg = "ivory", border =


3, font = ("times new roman", 17, "bold"))
eName.place(x = 350, y = 80)

eDob = DateEntry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eDob.place(x = 350, y = 124)

eGender = Entry(fWindow, bg = "ivory", border =


3, font = ("times new roman", 17, "bold"))
eGender.place(x = 350, y = 168)

eCaste = Entry(fWindow, bg = "ivory", border =


3, font = ("times new roman", 17, "bold"))
eCaste.place(x = 350, y = 212)

eReligion = Entry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eReligion.place(x = 350, y = 256)
eAddress = Entry(fWindow, bg = "ivory", border
= 3, font = ("times new roman", 17, "bold"))
eAddress.place(x = 350, y = 300)

eCity = Entry(fWindow, bg = "ivory", border = 3,


font = ("times new roman", 17, "bold"))
eCity.place(x = 350, y = 344)

eState = Entry(fWindow, bg = "ivory", border =


3, font = ("times new roman", 17, "bold"))
eState.place(x = 350, y = 388)

ePin = Entry(fWindow, bg = "ivory", border = 3,


font = ("times new roman", 17, "bold"))
ePin.place(x = 350, y = 432)

#Entry box in Right Side

eCountry = Entry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eCountry.place(x = 970, y = 80)

eBranchName = Entry(fWindow, bg = "ivory",


border = 3, font = ("times new roman", 17, "bold"))
eBranchName.place(x = 970, y = 124)

eMobileNo = Entry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eMobileNo.place(x = 970, y = 168)

eEmailId = Entry(fWindow, bg = "ivory", border =


3, font = ("times new roman", 17, "bold"))
eEmailId.place(x = 970, y = 212)
ePanNo = Entry(fWindow, bg = "ivory", border =
3, font = ("times new roman", 17, "bold"))
ePanNo.place(x = 970, y = 256)

eAadharNo = Entry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eAadharNo.place(x = 970, y = 300)

eAdminId = Entry(fWindow, bg = "ivory", border


= 3, font = ("times new roman", 17, "bold"))
eAdminId.place(x = 970, y = 344)

eNewPassword = Entry(fWindow, bg = "ivory",


border = 3, font = ("times new roman", 17, "bold"))
eNewPassword.place(x = 970, y = 388)

eConfromPassword = Entry(fWindow, bg =
"ivory", border = 3, font = ("times new roman", 17,
"bold"))
eConfromPassword.place(x = 970, y = 432)

'''
user(name text, address text, city text, state text,
zip text, country text,
dob text pan text, aadhar text, email text,
mobile text, account text, branch text, balance
text,

# not has === userId text, password


'''
import sqlite3
def submit():
db = sqlite3.connect("BankDb.db")
cr = db.cursor()
if eNewPassword.get() ==
eConfromPassword.get():
cr.execute("insert into admin(name, dob,
gender, caste, religion, address, city, state, pin,
country, branchName,mobileNo, emailId, panNo,
aadharNo, adminId, password)values
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", ( eName.get(),
eDob.get(), eGender.get(), eCaste.get(),
eReligion.get(), eAddress.get(), eCity.get(),
eState.get(), ePin.get(), eCountry.get(),
eBranchName.get(), eMobileNo.get(),
eEmailId.get(), ePanNo.get(), eAadharNo.get(),
eAdminId.get(), eNewPassword.get()))

window.destroy()
db.commit()
db.close()
else:
from MsgBox import msgBox
msgBox("New Password and Confrom
Password must be same",650,1)

bSubmit = Button(fWindow, text = "Submit", bg


= "green", fg = "white", font = ("times new roman",
20, "bold"), command = submit)
bSubmit.place(x = 595, y = 510)
window.mainloop()
#adminRegistration()

#-----------------------------------------------------------------------
--------------------------------

import sqlite3
from turtle import home
from MsgBox import msgBox
from tkinter import *
from HomePage import homePage

def createPassword(uniqueId, candidate):


t = Tk()
t.title("Create User's Password")
t.minsize(560,470)
t.maxsize(560,470)
fCreatePassword = Frame(t, width = 560,
height = 470, bg = "beige")
fCreatePassword.pack()

db = sqlite3.connect("BankDb.db")
cr = db.cursor()

Label(fCreatePassword, text = '''Create User Id


and password and password will contain atleast
a number, a special character(like @, %) a
uppercase and a
lowercase character and its mininum length is 6''',
bg = "beige", fg = "blue", font = ("times new
roman", 15)).place(x = 25, y = 20)
Label(fCreatePassword, text = candidate, bg =
"beige", fg = "blue", font = ("times new roman",
20)).place(x = 25, y = 120)

Label(fCreatePassword, text = "New


Password", bg = "beige", fg = "blue", font = ("times
new roman", 20)).place(x = 25, y = 170)

Label(fCreatePassword, text = "Confrom


Password", bg = "beige", fg = "blue", font = ("times
new roman", 20)).place(x = 25, y = 220)

eid = Entry(fCreatePassword, font = ("times


new roman", 20))
eid.place(x = 245, y = 120)

eNewPassword = Entry(fCreatePassword, font


= ("times new roman", 20))
eNewPassword.place(x = 245, y = 170)

eConfromPassword = Entry(fCreatePassword,
font = ("times new roman", 20))
eConfromPassword.place(x = 245, y = 220)

def create():
newPass = eNewPassword.get()
conPass = eConfromPassword.get()
id = eid.get()
if id != "":
if newPass != "" and conPass != "":

if newPass == conPass:
upper = any(i.isupper() for i in
newPass)
lower = any(i.islower() for i in
newPass)
numeric = any(i.isnumeric() for i in
newPass)
if newPass.isalnum() == False and
upper and lower and numeric and len(newPass) >=
6:
if candidate == "User Id":
cr.execute("select accountNo
from user where userId = ?",(id,))
if cr.fetchall() == []:
cr.execute("update user set
userId = ? where accountNo = ?",(id,uniqueId))
cr.execute("update user set
password = ? where accountNo = ?",
(newPass,uniqueId))
db.commit()
t.destroy()
msgBox('''Your Id and
Password is
created successfully now you
can login using your id and
password''',400,1,200)

homePage()
else:
msgBox("User Id is
exist",300,1)
'''elif candidate == "Admin Id":
cr.execute("select adminId from
admin where adminId = ?",(id,))
if cr.fetchall() == []:
pass
else:
msgBox("Admin Id is
exist",300,1)'''
else:
msgBox("Weak password",300,1)
else:
msgBox('''New Password and
Confrom
Password must be same''',400,1,150)
else:
msgBox('''New password or Confrom
Password can not be Blank''',400,1,150)
else:
msgBox("User Id can not be blank",350,1)

Button(fCreatePassword, text = "Create", bg =


"blue", fg = "white", width = 8, font = ("times new
roman", 20), command = create).place(x = 225, y =
390)

t.mainloop()

#createPassword("2", "User Id")

#-----------------------------------------------------------------------
--------------------------------
from tkinter import *
import sqlite3

db = sqlite3.connect("BankDB.db")
cr = db.cursor()

try:
cr.execute("create table user(name text,
guardianName text, relationWithGuardian text, dob
text, gender text,maritalStatus text, caste text,
religion text, address text, city text, state text, pin
text, country text,annualIncome text, occupation
text, branchName text,openingBalance text,
accountNo text primary key, accountType
text,customerId text, mobileNo text, emailId text,
panNo text, aadharNo text, userId text, password
text)")
except:
pass

try:
cr.execute("create table admin(name text, dob
text, gender text, caste text, religion text, address
text, city text, state text, pin text, country text,
branchName text, mobileNo text, emailId text,
panNo text, aadharNo text, adminId text primary
key, password text)")
except:
pass

db.commit()
'''
def submit():
lvAdminId = gvAdminId.get()
lvPassword = gvPassword.get()
lvConfrom = gvConfrom.get()

if lvPassword == lvConfrom:
cr.execute("insert into admin(adminId,
password) values (?,?)", (lvAdminId, lvPassword))
db.commit()
window.destroy()

else:
print("Password and confrom password must
be same")
print(lvPassword, "and", lvConfrom, "is not
same")
'''

window = Tk()
window.title("DataBase Design")
window.geometry("640x330+400+125")
window.config(background = "ivory")

design = Label(window, text ="DataBase Design is


complete", font = ("times new roman",20,"bold"),
bg = "ivory", fg = "blue")
design.place(x = 150, y = 120)

'''
fWindow = Frame (window, background = "ivory",
width = 640, height = 330)
fWindow.place(x = 0, y = 0)

lAdminId = Label(fWindow, text = "New Admin Id",


font = ("times new roman",20,"bold"), bg = "ivory",
fg = "blue")
lAdminId.place(x = 50, y = 50)

lPassword = Label(fWindow, text = "New Password",


font = ("times new roman", 20, "bold"), bg =
"ivory", fg = "blue")
lPassword.place(x = 50, y = 100)

lConfrom = Label(fWindow, text = "Confrom


Password", font = ("times new roman", 20, "bold"),
bg = "ivory", fg = "blue")
lConfrom.place(x = 50, y = 150)

gvAdminId = StringVar()
gvPassword = StringVar()
gvConfrom = StringVar()

eAdminId = Entry(fWindow, font = ("times new


roman", 20, "bold"), border = 3, textvar =
gvAdminId)
eAdminId.place(x = 300, y = 50)

ePassword = Entry(fWindow, font = ("times new


roman", 20, "bold"), border = 3, textvar =
gvPassword)
ePassword.place(x = 300, y = 100)
eConfrom= Entry(fWindow, font = ("times new
roman", 20, "bold"), border = 3, textvar =
gvConfrom)
eConfrom.place(x = 300, y = 150)

bSubmit = Button(fWindow, text = "Submit", bg =


"#102762", fg = "white", font = ("times new
roman", 20, "bold"), command = submit)
bSubmit.place(x = 220, y = 230)
'''

window.mainloop()

#-----------------------------------------------------------------------
--------------------------------

from re import A
from tkinter import *

def msgBox(text, w = 250, noArg = 1, h = 120):


msgBox = Tk()
msgBox.title("Warning !!!")
msgBox.geometry("100x120+550+300")
msgBox.maxsize(w, h)
msgBox.minsize(w, h)
msgBox.config(background = "red")

def no():
global concenment
msgBox.destroy()
concenment = False

def yes():
global concenment
msgBox.destroy()
concenment = True

msg = Label(msgBox, text = text,bg = "red", fg =


"white", font = ("times new roman", 20, "bold"))
#msg.place(x = 30, y = 10)
msg.pack(pady = 10)

if noArg == 1:
ok = Button(msgBox, text = "OK", width = 5,
bg = "cyan", fg = "black", font = ("times new
roman", 15, "bold"), command = lambda :
msgBox.destroy())
ok.pack()
else:
frame = Frame(msgBox, bg = "red", width =
300, height = 50)
frame.pack()
bYes = Button(frame, text = "Yes", width = 5,
bg = "cyan", font = ("times new roman", 15, "bold"),
command = yes)
bYes.pack(side = "left", pady = 10, padx=10,
fill = X)
bNo = Button(frame, text = "No", width = 5, bg
= "cyan", font = ("times new roman", 15, "bold"),
command = no)
bNo.pack(side = "left",pady = 10, padx=10, fill
= Y)

msgBox.mainloop()
try:
return concenment
except:
pass

#print(msgBox("Are you sure ?"))


#print(msgBox("Are you sure ?",250,2,120))
#msgBox("Account No is Used",260,1)
#msgBox("New Password and Confrom Password
must be same",650,1)
#h = msgBox("New Password and Confre",400,2)
#msgBox("Are you sure to logout",400,2)
#msgBox("Invalid User Id or Password", 400, 2)

#msgBox('''Your Id and Password is


#created successfully now you
#can login using your id and
#password''',400,1,200)

#-----------------------------------------------------------------------
--------------------------------

import sqlite3
from tkinter import *
from MsgBox import msgBox
from Otp import otp
from tkcalendar import DateEntry

def newUser():
db = sqlite3.connect("BankDB.db")
cr = db.cursor()
window = Tk()
window.title("New User")
window.geometry("560x470+390+125")
window.minsize(560,470)
window.maxsize(560,470)

fWindow = Frame(window, width = 560, height =


470, bg = "beige")
fWindow.pack()

Label(fWindow, text = "Name", bg = "beige", fg =


"blue", font = ("times new roman", 20)).place(x =
50, y = 50)

Label(fWindow, text = "Account No.", bg =


"beige", fg = "blue", font = ("times new roman",
20)).place(x = 50, y = 100)

Label(fWindow, text = "Date of Birth", bg =


"beige", fg = "blue", font = ("times new roman",
20)).place(x = 50, y = 150)

Label(fWindow, text = "Branch Name", bg =


"beige", fg = "blue", font = ("times new roman",
20)).place(x = 50, y = 200)

Label(fWindow, text = "Email Id", bg = "beige", fg


= "blue", font = ("times new roman", 20)).place(x =
50, y = 250)
Label(fWindow, text = "Mobile No.", bg = "beige",
fg = "blue", font = ("times new roman", 20)).place(x
= 50, y = 300)

eName = Entry(fWindow, font = ("times new


roman", 20))
eName.place(x = 220, y = 50)

eAccountNo = Entry(fWindow, font = ("times new


roman", 20))
eAccountNo.place(x = 220, y = 100)

eDob = DateEntry(fWindow, font = ("times new


roman", 20))
eDob.place(x = 220, y = 150)

eBranchName = Entry(fWindow, font = ("times


new roman", 20))
eBranchName.place(x = 220, y = 200)

eEmailId = Entry(fWindow, font = ("times new


roman", 20))
eEmailId.place(x = 220, y = 250)

eMobileNo = Entry(fWindow, font = ("times new


roman", 20))
eMobileNo.place(x = 220, y = 300)

def next():
cr.execute("select name, accountNo, dob,
emailId, mobileNo from user where accountNo = ?",
(eAccountNo.get(),))
userData = cr.fetchall()

# if data is not found then cr.fetchall()[0][0]


will generate error that means account no is not
exist in db
if userData != []:
if eName.get() == userData[0][0] and
eDob.get() == userData[0][2] and eEmailId.get()
== userData[0][3] and eMobileNo.get() ==
userData[0][4]:

window.destroy()
otp(userData[0][3], userData[0][1])

else:
msgBox("Incorrect User's Details", 400,
1)

else:
msgBox("Invalid Account NO", 300, 1)

Button(fWindow, text = "Next", bg = "blue", fg =


"white", width = 8, font = ("times new roman", 20),
command = next).place(x = 225, y = 390)

window.mainloop()

#newUser()

#-----------------------------------------------------------------------
--------------------------------
from tkinter import *
import random
import smtplib
from MsgBox import msgBox
from CreatePassword import createPassword

def otp(emailId, accountNo):

otpWindow = Tk()
otpWindow.geometry("450x450+390+125")
otpWindow.minsize(450,450)
otpWindow.maxsize(450,450)
otpWindow.title("OTP")
otpWindow.config(background="beige")
def sendOtp():
try:
global otp
otp = "".join([str(random.randint(0,9)) for i
in range(8)])

server =
smtplib.SMTP("smtp.gmail.com",587)
server.starttls()
server.login("[email protected]",
"pverdkqiumtyiwhb")
subject = "OTP"
body = "Welcome to SR Bank \nYour OTP for
is "+str(otp)
msg = "Subject: {}\n\n{}".format(subject,
body)
server.sendmail("[email protected]",
emailId, msg)
except:
msgBox("Check your internet connection",
400, 1)

def submit():
global authorize
global tried
if otp == eOtp.get():
otpWindow.destroy()
createPassword(accountNo, "User Id")
else:
try:
tried += 1
except:
tried = 1

if tried == 3:
otpWindow.destroy()
msgBox("You are not eligible",350,1)

if tried != 3:
msgBox("Invalid OTP", 300, 1)

Label(otpWindow, text = "Enter the OTP that is


send to your \nregistered Email Id", fg = "blue", bg
= "beige", font = ("times new roamn", 15)).place(x
= 80, y = 50)

eOtp = Entry(otpWindow, font = ("times new


roman",20))
eOtp.place(x = 90, y = 130)

bSendOtp = Button(otpWindow, text = "Send


OTP", font = ("times new roman", 15), bg =
"beige", fg = "blue", border = 0, command =
sendOtp).place(x = 180, y = 310)

bSubmit = Button(otpWindow, text =


"Submit",width = 8, bg = "blue", fg = "white", font
= ("times new roman", 20), command =
submit).place(x = 160, y = 350)

otpWindow.mainloop()

#otp("[email protected]")

#-----------------------------------------------------------------------
--------------------------------

from tkinter import *


from PIL import Image, ImageTk
import sqlite3

def userInterface(accountNo):

db = sqlite3.connect("BankDB.db")
cr = db.cursor()
#Fetching data from database
cr.execute("select name, address, city, state, pin,
country,dob, panNo, aadharNo, emailId, mobileNo,
accountNo, branchName, openingBalance from user
where accountNo = ?",(accountNo,))
'''
1. cr returns that is [('name', 'branch',
'balance')]
2. store it in crReturn = cr.fetchall()
3. data = crReturn[0] that is ('name', 'branch',
'balance')
4. data[0] that is name
'''
crReturn = cr.fetchall()
data = crReturn[0]

#define function for display profile and account


summmery AND logout
def summery():
fProfile.place_forget()
sProfile.place_forget()
fSummery.place(x = 250, y = 151)

def profile():
fSummery.place_forget()
fProfile.place(x = 250, y = 151)

def nextProfile():
fProfile.place_forget()
sProfile.place(x = 250, y = 151)

def previousProfile():
sProfile.place_forget()
fProfile.place(x = 250, y = 151)

def logOut():
window.destroy()
from HomePage import homePage
homePage()
'''
from MsgBox import msgBox
sure = msgBox("Are you sure to logout",400,2)
if sure == True:
window.destroy()
from HomePage import homePage
homePage()'''

window = Tk()
window.geometry("1000x652+200+30")
window.maxsize(1000,652)
window.minsize(1000,652)
window.title("User Interface")
fWindow = Frame(window, width = 1000, height
= 650, bg = "ivory")
fWindow.pack()

fTop = Frame(fWindow, width = 1000, height =


100, bg = "blue")
fTop.place(x = 0, y = 0)

#insert image
img = Image.open("1.png")
rImg = img.resize((130,106))
logoImg = ImageTk.PhotoImage(rImg)
logo = Label(fTop, image = logoImg, bg = "blue")
logo.place(x = 0, y = 0)
lBankName = Label(fTop,text = "SR Bank",fg =
"white", bg = "blue", font = ("times new roman", 40,
"bold"))
lBankName.place(x = 135, y = 18)

# Home page
hLogo =
ImageTk.PhotoImage(Image.open("1.png").resize((5
00,500)))

Label(fWindow, image = hLogo,


bg="ivory").place(x = 320, y = 150)

Label(fWindow, text = "Welcome to the User


Page", font = ("times new roman", 40, "bold"), bg =
"ivory", fg = "blue").place(x = 280, y = 150)

fLeft = Frame(fWindow, width = 200, height =


550, bg = "ivory")#, highlightbackground = "blue",
highlightthickness = 2
fLeft.place(x = 0, y = 100)

# welcome user
fWelcome = Frame(fTop, height = 100, width =
350, bg = "blue")
fWelcome.place(x = 650, y = 0)
lWelcome = Label(fWelcome, text = "Welcome",
bg = "blue", fg = "white", font = ("times new
roman", 20, "bold"))
lWelcome.place(relx=.5, rely=.3,anchor=
CENTER)
lUserName = Label(fWelcome, text = data[0], bg
= "blue", fg = "white", font = ("times new roman",
20, "bold"))
lUserName.place(relx = .5, rely = .7, anchor =
CENTER)

# frame for summery


button------------------------------------------
fSummery = Frame(fWindow, height = 450, width
= 700, bg = "beige")

# labels for name of database's data for


summery button difference 50
lName = Label(fSummery, text = "Name", bg =
"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lName.place(x = 90, y = 135)

lAccountNo = Label(fSummery, text = "Account


No", bg = "beige", fg = "blue", font = ("times new
roman", 15, "bold"))
lAccountNo.place(x = 90, y = 185)

lBranch = Label(fSummery, text = "Branch


Name", bg = "beige", fg = "blue", font = ("times
new roman", 15, "bold"))
lBranch.place(x = 90, y = 235)

lBalance = Label(fSummery, text = "Available


Balance", bg = "beige", fg = "blue", font = ("times
new roman", 15, "bold"))
lBalance.place(x = 90, y = 285)
# labels for display database's data for
summery button
dName = Label(fSummery, text = data[0], width
= 22, fg = "blue", bg = "white", relief = "sunken",
font = ("times new roman", 15, "bold"))
dName.place(x = 340, y = 135)

dAccountNo = Label(fSummery, text = data[11],


width = 22, fg = "blue", bg = "white", relief =
"sunken", font = ("times new roman", 15, "bold"))
dAccountNo.place(x = 340, y = 185)

dBranch = Label(fSummery, text = data[12],


width = 22, fg = "blue", bg = "white", relief =
"sunken", font = ("times new roman", 15, "bold"))
dBranch.place(x = 340, y = 235)

dBalance = Label(fSummery, text = data[13],


width = 22, fg = "blue", bg = "white", relief =
"sunken", font = ("times new roman", 15, "bold"))
dBalance.place(x = 340, y = 285)

#labels for profile first


page------------------------------------------

fProfile = Frame(fWindow, height = 450, width =


700, bg = "beige")

# labels for name of database's data for profile


first page--------------------------------
lName = Label(fProfile, text = "Name", bg =
"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lName.place(x = 90, y = 35)

lAddress = Label(fProfile, text = "Address", bg =


"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lAddress.place(x = 90, y = 85)

lCity = Label(fProfile, text = "City", bg = "beige",


fg = "blue", font = ("times new roman", 15, "bold"))
lCity.place(x = 90, y = 135)

lState = Label(fProfile, text = "State", bg =


"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lState.place(x = 90, y = 185)

lPin = Label(fProfile, text = "Pin", bg = "beige", fg


= "blue", font = ("times new roman", 15, "bold"))
lPin.place(x = 90, y = 235)

lCountry = Label(fProfile, text = "Country", bg =


"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lCountry.place(x = 90, y = 285)

# labels for display database's data for profile in


first page ---------------------
dName = Label(fProfile, text = data[0], width =
22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dName.place(x = 340, y = 35)

dAddress = Label(fProfile, text = data[1], width =


22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dAddress.place(x = 340, y = 85)

dCity = Label(fProfile, text = data[2], width = 22,


fg = "blue", bg = "white", relief = "sunken", font =
("times new roman", 15, "bold"))
dCity.place(x = 340, y = 135)

dState = Label(fProfile, text = data[3], width =


22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dState.place(x = 340, y = 185)

dPin = Label(fProfile, text = data[4], width = 22,


fg = "blue", bg = "white", relief = "sunken", font =
("times new roman", 15, "bold"))
dPin.place(x = 340, y = 235)

dCountry = Label(fProfile, text = data[5], width =


22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dCountry.place(x = 340, y = 285)

# button for go next in profile


bNext = Button(fProfile, text = "Next >", width =
10, bg = "blue", fg = "white", font = ("times new
roman", 15, "bold"), command = nextProfile)
bNext.place(x = 295, y = 370)
#labels for profile second
page------------------------------------------

sProfile = Frame(fWindow, height = 450, width =


700, bg = "beige")

# labels for name of database's data for profile


second page--------------------------------
lDob = Label(sProfile, text = "Date of Birth", bg =
"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lDob.place(x = 90, y = 35)

lPanNo = Label(sProfile, text = "PAN No", bg =


"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lPanNo.place(x = 90, y = 85)

lAadharNo = Label(sProfile, text = "Aadhar No",


bg = "beige", fg = "blue", font = ("times new
roman", 15, "bold"))
lAadharNo.place(x = 90, y = 135)

lEmailId = Label(sProfile, text = "Email Id", bg =


"beige", fg = "blue", font = ("times new roman", 15,
"bold"))
lEmailId.place(x = 90, y = 185)

lMobileNo = Label(sProfile, text = "Mobile No", bg


= "beige", fg = "blue", font = ("times new roman",
15, "bold"))
lMobileNo.place(x = 90, y = 235)
# labels for display database's data for profile in
second page ---------------------
dDob = Label(sProfile, text = data[6], width = 22,
fg = "blue", bg = "white", relief = "sunken", font =
("times new roman", 15, "bold"))
dDob.place(x = 340, y = 35)

dPanNo = Label(sProfile, text = data[7], width =


22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dPanNo.place(x = 340, y = 85)

dAadharNo = Label(sProfile, text = data[8], width


= 22, fg = "blue", bg = "white", relief = "sunken",
font = ("times new roman", 15, "bold"))
dAadharNo.place(x = 340, y = 135)

dEmailId = Label(sProfile, text = data[9], width =


22, fg = "blue", bg = "white", relief = "sunken", font
= ("times new roman", 15, "bold"))
dEmailId.place(x = 340, y = 185)

dMobileNo = Label(sProfile, text = data[10],


width = 22, fg = "blue", bg = "white", relief =
"sunken", font = ("times new roman", 15, "bold"))
dMobileNo.place(x = 340, y = 235)

# button for go previous in profile


bPrevious = Button(sProfile, text = "< Previous",
width = 10, bg = "blue", fg = "white", font = ("times
new roman", 15, "bold"), command =
previousProfile)
bPrevious.place(x = 295, y = 370)

#buttons in left frame


bSummery = Button ( fLeft, text = "A/C
Summery",bg = "blue", fg = "white", width = 12,
font = ("times new roman", 15, "bold"), command =
summery)
bSummery.place(x = 0, y = 100)

bProfile = Button(fLeft, text = "Profile", bg =


"blue", fg = "white", width = 12, font = ("times new
roman", 15, "bold"), command = profile)
bProfile.place(x = 0, y = 250)

bLogOut = Button(fLeft, text = "Log Out", bg =


"blue", fg = "white", width = 12, font = ("times new
roman", 15, "bold"), command =
logOut)
bLogOut.place(x = 0, y = 400)

window.mainloop()

#userInterface(1)

#-----------------------------------------------------------------------
--------------------------------

import sqlite3
from tkinter import *
from MsgBox import msgBox
from UserInterface import userInterface
from Otp import otp
from NewUser import newUser

def userLogin():

db = sqlite3.connect("BankDB.db")
cr = db.cursor()

def submit():
cr.execute("select accountNo from user where
userId = ? and password = ?",(eUserId.get(),
ePassword.get()))

# if data is not found then cr.fetchall()[0][0]


will generate error
try:
accountNo = cr.fetchall()[0][0]
window.destroy()
userInterface(accountNo)
except:
msgBox("Invalid User Id or Password", 400,
1)

def newAcc():
window.destroy()
newUser()

def forgetPassword():
window.destroy()
newUser()

window = Tk()
window.title("User Login")
window.geometry("540x450+400+125")
window.maxsize(540, 450)
window.minsize(540, 450)

fWindow = Frame (window, background =


"beige", width = 540, height = 450)
fWindow.place(x = 0, y = 0)

lUserId = Label(fWindow, text = "User Id", font =


("times new roman",20), bg = "beige", fg = "blue")
lUserId.place(x = 50, y = 50)

lPassword = Label(fWindow, text = "Password",


font = ("times new roman", 20), bg = "beige", fg =
"blue")
lPassword.place(x = 50, y = 100)

eUserId = Entry(fWindow, font = ("times new


roman", 20))
eUserId.place(x = 200, y = 50)

ePassword = Entry(fWindow, font = ("times new


roman", 20))
ePassword.place(x = 200, y = 100)

bForgotPassword = Button(fWindow, text =


"forget password", font = ("times new roman", 15),
bg = "beige", fg = "blue", border = 0, command =
forgetPassword)
bForgotPassword.place(x = 195, y = 190)
bSubmit = Button(fWindow, text =
"Submit",width = 8, bg = "blue", fg = "white", font
= ("times new roman", 20), command = submit)
bSubmit.place(x = 200, y = 230)#102762

lLine = Label(fWindow, text =


"------------------------------------
OR------------------------------------",font = ("times new
roman",15), bg = "beige", fg = "blue")
lLine.place(x = 0, y = 300)

bNewAcc = Button(fWindow, text = "New User",


bg = "green", fg = "white",width = 8, font = ("times
new roman", 20), command = newAcc)
bNewAcc.place(x = 200, y = 350)

window.mainloop()

#userLogin()
#-----------------------------------------------------------------------
--------------------------------
from msilib.schema import ComboBox
from tkinter import *
from tkinter import ttk
from tkcalendar import DateEntry
import sqlite3
from MsgBox import msgBox

def userRegistration():
# create list for add in Dob value
dd = [str(i) for i in range(1,32)]
mm = [str(i) for i in range(1,13)]
yy = [str(i) for i in range(2022,1900,-1)]

db = sqlite3.connect("BankDb.db")
cr = db.cursor()

window = Tk()
window.geometry("1300x680+30+5")
window.title("Open New User's Account")

fWindow = Frame(window, height = 680, width


= 1300, background = "beige")
fWindow.pack()

details = Label(fWindow, text = "Fill the New


User's details", bg = "beige", fg = "green", font =
("times new roman",30,"bold"))
details.place(x = 424, y = 1)

#All Labels

lName = Label(fWindow, text = "Name", bg =


"beige", fg = "blue", font = ("times new roman", 17,
"bold"))
lName.place(x = 80, y = 80)

lGuardianName = Label(fWindow, text =


"Guardian Name", bg = "beige", fg = "blue", font =
("times new roman", 17, "bold"))
lGuardianName.place(x = 80, y = 124)
lRelationWithGuardian = Label(fWindow, text =
"Relation with Guardian", bg = "beige", fg = "blue",
font = ("times new roman", 17, "bold"))
lRelationWithGuardian.place(x = 80, y = 168)

lDob = Label(fWindow, text = "Date of Birth",


bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lDob.place(x = 80, y = 212)

lGender = Label(fWindow, text = "Gender", bg


= "beige", fg = "blue", font = ("times new roman",
17, "bold"))
lGender.place(x = 80, y = 256)

lMaritalStatus = Label(fWindow, text = "Marital


Status", bg = "beige", fg = "blue", font = ("times
new roman", 17, "bold"))
lMaritalStatus.place(x = 80, y = 300)

lCaste = Label(fWindow, text = "Caste", bg =


"beige", fg = "blue", font = ("times new roman", 17,
"bold"))
lCaste.place(x = 80, y = 344)

lReligion = Label(fWindow, text = "Religion",


bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lReligion.place(x = 80, y = 388)

lAddress = Label(fWindow, text = "Address",


bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lAddress.place(x = 80, y = 432)

lCity = Label(fWindow, text = "City", bg =


"beige", fg = "blue", font = ("times new roman", 17,
"bold"))
lCity.place(x = 80, y = 476)

lState = Label(fWindow, text = "State", bg =


"beige", fg = "blue", font = ("times new roman", 17,
"bold"))
lState.place(x = 80, y = 520)

lPin = Label(fWindow, text = "Pin", bg =


"beige", fg = "blue", font = ("times new roman", 17,
"bold"))
lPin.place(x = 80, y = 564)

#Labels in Right Side

lCountry = Label(fWindow, text = "Country",


bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lCountry.place(x = 700, y = 80)

lAnnualIncome = Label(fWindow, text =


"Annual Income", bg = "beige", fg = "blue", font =
("times new roman", 17, "bold"))
lAnnualIncome.place(x = 700, y = 124)

lOccupation = Label(fWindow, text =


"Occupation", bg = "beige", fg = "blue", font =
("times new roman", 17, "bold"))
lOccupation.place(x = 700, y = 168)
lBranch = Label(fWindow, text = "Branch
Name", bg = "beige", fg = "blue", font = ("times
new roman", 17, "bold"))
lBranch.place(x = 700, y = 212)

lBalance = Label(fWindow, text = "Opening


Balance", bg = "beige", fg = "blue", font = ("times
new roman", 17, "bold"))
lBalance.place(x = 700, y = 256)

lAccount = Label(fWindow, text = "Account


No", bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lAccount.place(x = 700, y = 300)

lAccountType = Label(fWindow, text =


"Account Type", bg = "beige", fg = "blue", font =
("times new roman", 17, "bold"))
lAccountType.place(x = 700, y = 344)

lCustomerId = Label(fWindow, text =


"Customer Id", bg = "beige", fg = "blue", font =
("times new roman", 17, "bold"))
lCustomerId.place(x = 700, y = 388)

lMobile = Label(fWindow, text = "Mobile No",


bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lMobile.place(x = 700, y = 432)
lEmailId = Label(fWindow, text = "Email Id", bg
= "beige", fg = "blue", font = ("times new roman",
17, "bold"))
lEmailId.place(x = 700, y = 476)

lPanNo = Label(fWindow, text = "PAN No", bg


= "beige", fg = "blue", font = ("times new roman",
17, "bold"))
lPanNo.place(x = 700, y = 520)

lAadharNo = Label(fWindow, text = "Aadhar


No", bg = "beige", fg = "blue", font = ("times new
roman", 17, "bold"))
lAadharNo.place(x = 700, y = 564)

#All Entry boxes

eName = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
eName.place(x = 350, y = 80)

eGuardianName = Entry(fWindow, width = 19,


font = ("times new roman", 17, "bold"))
eGuardianName.place(x = 350, y = 124)

eRelationWithGuardian =
ttk.Combobox(fWindow, width = 17, values =
["Father", "Mother", "Uncle", "Aunt", "Brother"], font
= ("times new roman", 17, "bold"))
eRelationWithGuardian.place(x = 350, y =
168)
eDob = DateEntry(fWindow, width=19, font =
("times new roman", 17))
eDob.place(x = 350, y = 212)

eGender = ttk.Combobox(fWindow, width = 17


,values = ["Male","Female","Others"], font = ("times
new roman", 17, "bold"))
eGender.place(x = 350, y = 256)

eMaritalStatus = ttk.Combobox(fWindow, width


= 17, font = ("times new roman", 17, "bold"), values
= ["Married","Unmarried"])
eMaritalStatus.place(x = 350, y = 300)

eCaste = ttk.Combobox(fWindow, width = 17,


font = ("times new roman", 17, "bold"), values =
["Gen","SC","ST","OBC"])
eCaste.place(x = 350, y = 344)

eReligion = ttk.Combobox(fWindow, width =


17, font = ("times new roman", 17, "bold"), values =
["Hindu","Muslim","Others"])
eReligion.place(x = 350, y = 388)

eAddress = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
eAddress.place(x = 350, y = 432)

eCity = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
eCity.place(x = 350, y = 476)
eState = Entry(fWindow, width = 19, font =
("times new roman", 17, "bold"))
eState.place(x = 350, y = 520)

ePin = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
ePin.place(x = 350, y = 564)

#Entry box in Right Side

eCountry = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
eCountry.place(x = 970, y = 80)

eAnnualIncome = Entry(fWindow, width = 19,


font = ("times new roman", 17, "bold"))
eAnnualIncome.place(x = 970, y = 124)

eOccupation = Entry(fWindow, width = 19, font


= ("times new roman", 17, "bold"))
eOccupation.place(x = 970, y = 168)

eBranchName = Entry(fWindow, width = 19,


font = ("times new roman", 17, "bold"))
eBranchName.place(x = 970, y = 212)

eOpeningBalance = Entry(fWindow, width =


19, font = ("times new roman", 17, "bold"))
eOpeningBalance.place(x = 970, y = 256)

eAccountNo = Entry(fWindow, width = 19, font


= ("times new roman", 17, "bold"))
eAccountNo.place(x = 970, y = 300)
eAccountType = ttk.Combobox(fWindow, width
= 17, font = ("times new roman", 17, "bold"),values
= ["Savings","Current","Credit"])
eAccountType.place(x = 970, y = 344)

eCustomerId = Entry(fWindow, width = 19,


font = ("times new roman", 17, "bold"))
eCustomerId.place(x = 970, y = 388)

eMobileNo = Entry(fWindow, width = 19, font


= ("times new roman", 17, "bold"))
eMobileNo.place(x = 970, y = 432)

eEmailId = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
eEmailId.place(x = 970, y = 476)

ePanNo = Entry(fWindow, width = 19, font =


("times new roman", 17, "bold"))
ePanNo.place(x = 970, y = 520)

eAadharNo = Entry(fWindow, width = 19, font


= ("times new roman", 17, "bold"))
eAadharNo.place(x = 970, y = 564)

def submit():
if eName.get() == "" or
eGuardianName.get() == "" or
eRelationWithGuardian.get() == "" or eDob.get()
== "" or eGender.get() == "" or
eMaritalStatus.get() == "" or eCaste.get() == "" or
eReligion.get() == "" or eAddress.get() == "" or
eCity.get() == "" or eState.get() == "" or
ePin.get() == "" or eCountry.get() == "" or
eAnnualIncome.get() == "" or eOccupation.get()
== "" or eBranchName.get() == "" or
eOpeningBalance.get() == "" or eAccountNo.get()
== "" or eAccountType.get() == "" or
eCustomerId.get() == "" or eMobileNo.get() == ""
or eEmailId.get() == "" or ePanNo.get() == "":
msgBox("Fill all the entries",300,1)
else:
cr.execute("select accountNo from user
where accountNo = ?", (eAccountNo.get(),))
acc = str(cr.fetchall())
print(acc[3:-4])
if acc[3:-4] == eAccountNo.get():

msgBox("Account No is Used !!!",280,1)


else:
cr.execute("insert into user(name,
guardianName, relationWithGuardian, dob, gender,
maritalStatus, caste, religion, address, city, state,
pin, country, annualIncome, occupation,
branchName,openingBalance, accountNo,
accountType, customerId, mobileNo, emailId,
panNo, aadharNo) values
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
(eName.get(),
eGuardianName.get(),eRelationWithGuardian.get(),
eDob.get(), eGender.get(), eMaritalStatus.get(),
eCaste.get(), eReligion.get(), eAddress.get(),
eCity.get(), eState.get(), ePin.get(),
eCountry.get(), eAnnualIncome.get(),
eOccupation.get(), eBranchName.get(),
eOpeningBalance.get(), eAccountNo.get(),
eAccountType.get(), eCustomerId.get(),
eMobileNo.get(), eEmailId.get(), ePanNo.get(),
eAadharNo.get()))
db.commit()
window.destroy()
db.close()

bSubmit = Button(fWindow, text = "Submit",


bg = "green", fg = "white", font = ("times new
roman", 20, "bold"), command = submit)
bSubmit.place(x = 595, y = 610)
window.mainloop()

#userRegistration()

-----------------------------------------------
XXX--------------------------------------------------

Thank You

You might also like