You are on page 1of 153

MAJOR PROJECT REPORT INTERNET BANKING

Submitted in partial fulfillment of the requirement for the award of the Diploma of (COMPUTER SCIENCE & TECHNOLOGY)

Project Guide:
ER. Madhu Dhiman

Submitted By:
Manju (D850325) Monika (D850327) Neelam (D850331) Nirotma (D850334)

DEPARTMENT OF COMPUTER SCIENCE AND TECHNOLOGY GOVERNMENT POLYTECHNIC FOR WOMEN KANDAGHAT, Distt. SOLAN (H.P.) Department of Computer Engineering Jan-June (2011)

GOVERNMENT POLYTEHNIC FOR WOMEN KANDAGHAT, DISTT. SOLAN (H.P) Department of Computer Engineering

Candidate Declaration
We hereby declare the work which is being presented in the entitled project INTERNET BANKING major project of the diploma in Computer science and engineering and submitted to the department of Computer science and engineering. H.P. India is an authentic record of our own work carried out during a period from Jan 2011 to June 2011, under the supervision of Er. Madhu Dhiman (lecturer, CSE). We have not submitted then matter presented in this project for the award of any other degree of this or any other university. This is to certify that our statement made by the candidate is correct to the best of my knowledge. ER. Madhu Dhiman (Project guide) Manju Guleria Monika Chauhan Neelam Verma Nirotma Panwar

OUR SPECIAL THANKS TO


Er. Vinita Arya (Principle of G.P.W Kandaghat) Er. Madhu Dhiman

GOVERNMENT POLYTEHNIC FOR WOMEN KANDAGHAT, DISTT.SOLAN (H.P) Department of Computer Engineering

CERTIFICATE
This is certify that this project report titled INTERNET BANKING submitted by Manju , Monika , Neelam & Nirotma in the partial fulfillment of the requirement for the award of the Diploma in computer engineering is a bonofide record of the work done by them at the GPW campus, kandaghat from 17th Jan to 20 June, 2011 under our supervision.

(ER. Madhu Dhiman)

(Er. Vinita Arya)

(project guide)

Principal

Deptt. Of CSE GPW Kandaghat, Distt. Solan (H.P)

ACKNOWLEDGEMENT
Making a project is a bear of an understanding, not only for developer but also for those around him. Great acknowledgement is extended to all the people who make this project possible with their enthusiastic support and encouragement. First and foremost, we should like to express our profound graduate and sincere acknowledgement to polytechnic (W), Kandaghat who has been a source of perpetual inspiration to us, gently guiding and paying our way towards a bright carrier, throughout our diploma. We are fortunate enough to have: Er. Madhu Dhiman project guide She was ever willing to giving support and encouragement. It was only through her care, support and help that we were able to overcome initial hiccups during our early days in the project work. The entire experience of our project at this institute has not only increased our knowledge and potential but also inculcated in us the desire to learn more and higher. We are grateful to Er. Vinita Arya principle of Govt. Polytechnic (W) Kandaghat for giving us opportunity to work in such a project. Thank for all your advice and help even if we dont say it enough, we appreciate it.

Government Polytechnic for Women Kandaghat Distt. Solan (H.P.) Department of Computer Engineering

INTRODUCTION TO ORGANIZATION

The Government polytechnic for Women Kandaghat is the only polytechnic in this state for women. This institute was established in the year 1984 by the government of H.P. The basic theme was to improve skill and to increase the po lytechnic are accredited by ALL INDIA COUNCIL OF TECHNICAL EDUCATION (AICTE) and PHARMACY COUNCIL OF INDIA (PCI). The courses of diploma in Computer Engineering and eltx.Engg.are also NBA accredited. Takniki shiksha Board Dharamshala conducts the annual an d semester examination and pre-admission test (PAT) to the polytechnic. This polytechnic has undergone a massive modernization and computerization. The latest computers and other equipments are installed under Broadband Aided Project. Presently the institute offers the following courses which are as follows: 1. Computer Engg. 2. Eltx. Engg. 3. Pharmacy

PREFACE

It has been a great experience work together here in our college under the guidance of brilliant minds and highly qualified people here in govt. polytechnic college for women, who have made enormous efforts to make all the jobs under taken here successfully always contributed significantly to the development and progress their minds. It has been due to their astounding efforts that we are today enjoying all sorts of luxuries that computer world has provided with us. During our working on this project we try our level best to keep things understandable.

INDEX

INTRODUCTION

INTRODUCTION

FEASIBILITY STUDY

FEASIBILITY STUDY
Feasibility study is a preliminary study undertaken to determine and document a projects viability. The term feasibility study is also used to refer to the resulting document. These results of this study are use to make a decision whether to

proceed with the project, or table it. If it indeed leads to a project being approved, it will-before the real work of the proposed project starts-be used to ascertain the likelihood of the projects success. It is an analysis of possible alternative solutions to a problem and a recommendation on the best alternatices.

EXPLANATION
1.1 NEED ANALYSIS 1.2 TECHNICAL FEASIBILITY STUDY 1.3 CULTURAL FEASIBILITY STUDY 1.4 LEGAL FEASIBILITY STUDY 1.5 MARKETING FEASIBILITY STUDY

EXPLANATION
Feasibility study could be used to test a proposal for new system, which could be used because: The current system may no longer carry its purpose Technological advancement have rendered the current system obsolete The business is expending, allowing it to cope with extra work load Customers are complaining about the speed & quality of the work the business provide A feasibility study should examine three main areas: Market issues Technical & organization requirements Financial overviews Within a feasibility study seven areas must be reviewed, including those of needs analysis, economics, technical, schedule, organizational, cultural & legal.

NEED ANALYSIS
A need analysis should be the first undertaking of a feasibility study as it clearly defines the project outline and the clients requirements. Once these question have been answered the person/s undertaking the feasibility study will have outline the projects need definitions.

The following questions need to be asked to define the project need definition: What is the end deliverable? What purpose will it serve? What are the environmental effects?? What are the quality requirements? What is the minimal quality requirements allowed? What sustainability can we expect? What carryover work can we expect? What are the penalty clauses?

TECHNICAL FEASIBILITY STUDY


This involves questions such as whether the technologies needed for the system exists, how difficult it will be to built, and whether the film has enough are experience using that technology. The assessment is based on an outline design of system requirement in term of input, output, fields, program and procedures. This can be qualified in terms of data, trends frequency of updating etc. in order to give an introduction to the technical system.

SCHEDULE FEASIBILITY STUDY


This involves questions such as how much time is available to built the new system, when it can be built, whether it interferes with normal business operation, number of resources required, dependencies etc.

CULTURAL FEASIBILITY STUDY


In this stage, the projects alternatives are evaluated for their impact on the local and general cultural. For e.g. Environment factors need to be considered.

LEGAL FEASIBILITY STUDY

Not necessarily last, but all projects must face legal scrutiny. When an organization has a legal council on staff or on retainer, such reviews are typically standards.

MARKETING FEASIBILITY STUDY


This will include analysis of single and multi-dimensional market forces that could affect the commercial, along with the company that is caring out the feasibility achieving more and more reputation as they have carried out safety checks which allow the system to run appropriately. Economical Feasibility: Establishing the cost effectiveness of the proposed system that is if the benefits do not outweigh the costs then it is not worth going ahead. Legal Feasibility: Determines whether the proposed system conflicts with legal requirements, e.g. The Data Protection Act. Operational Feasibility: Do the current work practices and procedures support a new system? Also social factors that is how the organizational changes will affect the working life of those affected by the system. Schedule Feasibility: Looks at how long the system will take to develop, or whether it can be completed in a given time period. For our project that is INTERNET BANKING we applied the above mentioned types of feasibility methods and could finally make the project. During the life cycle of the project we underwent several steps involved in feasibility study such as economic feasibility, schedule feasibility and technical feasibility to make sure that we could successfully complete our project.

SYSTEM DEVELOPMENT LIFE CYCLE

SYSTEM DEVELOPMENT LIFE CYCLE


The system development life cycle ia a project management technique that divides complex projects into smaller, more easily managed segments or phases. Segmenting projects allows managers to verify the successful. Completion of project phases before allocating resources to subsequent phases.

Software development projects typically include initiation, planning, design, development, testing, implementation and maintenance phases. However, the phases may be divided differently depending on the organization involved. For example, initial project activities might be designated as request, requirementsdefinition and planning phases or initiation, concept development in reviewing the output of each phase to ensure the system is being built o deliver the needed functionality. The System Development Life cycle As used in the Construction of the Server Appliance

SYSTEM DESIGN
Introduction

Every man made entity is first a concept in someones mind computerized system, like other product technologies are developed in response to the perceived needs. Before any development is undertaken, certain specification are made consulting, the end user. Managers of the relative department & experienced engineers who have been associated with the development of various applications based on the user requirement, the software to be developed is plan the first step in planning a software projects to be prepare users technology a concise statement of the problem to be solved the definition problem, statement include a description of present situation and goal to be achieved by the new system.

User Requirements
To analyze & study a system, it is most necessary to recognize the requirement of the user. The requirements of the user of the personal information system are: Application should be user friendly so that user can select alternatives from menu with minimum efforts. Help should be available to user to solve any problem that occurs at any time of insertion, deletion and updating. Documentation of the system knows how to start and continue using the system. To provide guidance to a trained user to expand and improve on the existing personal information system.

Data Flow Diagrams

Data flow diagrams (Also called Data Flow Graphs) is commonly used during problem analysis. Data flow diagram (DFD) is quite general and is not limited to problem analysis for software requirement specification. They were in use long before the software engineering discipline begin and are very useful in understanding the system and can be effectively used during analysis. A DFD shows the flow of data through a system. It views a system as a function that transforms the inputs into desired output. Suggestions for constructing a data flow graph: Work your way consistently from the inputs to the outputs or vice versa. If you get stuck, reverse direction. Start with a high level data flow graph with few major transforms describing the entire transformation from the inputs to outputs and then refine each transform with more detailed transformations. Never try to show control logic. If you find yourself thinking in terms of loops and decisions, it is time to stop and start again. Label each arrow with proper data element. Inputs and outputs of each transform should be carefully identified. Make use of and+ operation and show sufficient detail in the data flow graph. Try drawing alternate data flow graphs setting on one. Once we have constructed a DFD and its associated data dictionary we have to somehow verify that they are correct. They can be no formal verification of a DFD is modeling is not formally specified anywhere against which verification can be done. Human processes and rules of thumb must be used for verification.

REQUIREMENTS

REQUIREMENTS

a) HARDWARE REQUIREMENTS:
Processor Memory Hard Disk Monitor CDROM Mouse Keyboard Pentium 128 MB 500 MB or higher Color Monitor CDROM Drive 52X Standard 2/3 button Standard Keyboard

b) SOFTWARE REQUIREMENTS:
1. Windows XP as operating system 2. Java language software

LANGUAGE SELECTION

LANGUAGE SELECTION

TESTING

TESTING
Debugging is not testing but is always occur as a consequence of testing. After the code is written, the program is generated and executed. The code is debugging using the built debugging facility.

Testing is a program consist of providing the programming with a set text inputs (or text case) and observation if the program as expected. If the program fails to behave as expected then the condition under which a failure occurs are noted for debugging and correction. It is preferable to discover any surprise before the organization implements they system and depends on it. Testing is done through the system development at various stages. It is always a good practice to text system at different levels a various intervals i.e. subsystem, program module as work progress and finally the system as a whole. If this is not done, then poorly tested system can fail after installation. During testing one should try and fine area in which the program can Each test case is design with the intent of finding errors in the way the system will process it. Through testing of program do not guarantee the reliability of system. It is done to ensure that the system runs errors free.

SOFTWARE TESTING FUNDAMENTALS


Testing presents an interesting anomaly for the software engineer. Earlier in the software process, the engineer attempts to build software from an abstract concept to a tangible Implementation. No comes that are intended to demolish the software that has been built.

Testing requires that the developer discard preconceived notions of the correctness of the software just develop and overcome a conflict of interest that occurs when errors are uncovered.

TESTING OBJECTIVES
There are number of rules that can serve well as testing well as testing objectives: 1. Testing is a process of executing a program with intent of finding an error. 2. A good test case is one that has a high probability of finding an as yet undiscovered errors. 3. A successful test is one that uncover as yet undiscovered errors.

TESTING PRINCIPLES
Before applying methods to design effective test cases, a software engineers must understand the basic principle that guides software testing. There is a set of testing rules. All tests should be traceable to organize/customer requirements. Test should be planned long before testing begins. The 80% of all errors uncovered during will likely be traceable to 20 of all program modules. Testing should begin in the small and progress toward testing in the large. Exhaustive testing is not possible. To be done effective, an independent third party should conduct testing.

TESTING FOR THE PROJECT MANAGEMENT


Testing is done at three levels: 1. Unit Testing 2. Integration Testing

3. System Testing

Unit Testing
In this phase analyst test the program/modules making up a system. For this reason unit testing is called program or module testing. It gives stress on the modules independently of one another to find errors. This helps the tester in detecting errors in coding and logic that are contained within that module alone.

Integrating Testing
After all modules of a system have been unit tested, integration of modules starts. The full product takes shape only after all the modules have been integrated. It consists of number of steps. During the each step, some modules are added to previously system and the system is tested again.

System Testing
Once all the modules have been integrated and tested, system testing can start. The system testing is the last chance to detect and correct errors before the system is installed. The purpose of the system testing is to consider all the likely variation to which it will be subjected and push the system to its limits.

DATAFLOW DIAGRAMS

DATA FLOW DIAGRAM


A graphical tool used to describe and analyze the movements of data through a system manual or automated including the process stores of the data and details in the system. Data flow diagrams are the central tool and basic from which other components are developed.

DFD SYMBOLS:

Represents data source and destination

Process Representation

Arrow Represent Data Flow

Represent Data Source

ZERO LEVAL DFD

1 LEVEL DFD

OUTPUT FORMS

LOGIN PAGE OF MY BANK

ENTER YOUR LOGINID AND PASSWORD TO LOGIN INTO MY BANK

PAGE OPENED AFTER LOGIN

TO VIEW ACCOUNT BALANCE CLICK ON ACCOUNT BALANCE

AFTER CLICKINK ON VIEW BUTTON DETAILS OF USER ACCOUNT IS DISPLAYED

TO VIEW THE ACCOUNT STATEMENT

TO VIEW ALL THE TRANSACTION SELECT MINI STATEMENT

TO VIEW BALANCE OF SELECTED PERIOD OF TIME

TO ADD BENIFICARY FOR TRANSACTION

TO TRANSFER THE AMOUNT WITHIN A BANK

TO ADD BENIFICIARY FOR TRANSACTION WITH OTHER BANK(NEFT)

TO TRANSFER THE AMOUNT TO OTHER BANK(NEFT)

TO ADD BENIFICIARY FOR TRANSACTION WITH OTHER BANK(USING RTGS)

TO TRANSFER THE AMOUNT TO OTHER BANK(USING RTGS)

TO VIEW THE ADDED BENIFICIARY WITHIN A BANK

TO VIEW THE ADDED BENIFICIARY OF OTHER BANK(NEFT)

TO VIEW THE ADDED BENIFICIARY OF OTHER BANK(USING RTGS)

LOANS PROVIDED BY MY BANK


1.PERSONAL LOANS

2.HOME LOANS

BANK INTERESTS

TO CHANGE PASSWORD

TO REQUEST FOR INTERNET BANKING CLICK ON REGISTER BUTTON

FILL THE FOLLOWING FIELDS FOR REGISTRATION

CODING

USER LOGIN
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class UserLogin extends JApplet implements ActionListener { static int count=0; private Connection con; Statement stmt; ResultSet rs; JLabel lblLoginId, lblPassword; JTextField tbLoginId; JPasswordField tbPassword; JButton btnLogin;

GridBagLayout gb; GridBagConstraints gbc;

FileWriter fout; BufferedWriter bwrite;

public UserLogin() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblLoginId=new JLabel("Login ID: "); lblPassword=new JLabel("Password: ");

tbLoginId=new JTextField(10); tbPassword=new JPasswordField(10);

btnLogin=new JButton("Login Me");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

} public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblLoginId,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(tbLoginId,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2; add(lblPassword,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(tbPassword,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;

gbc.gridy=3; add(btnLogin,gbc); btnLogin.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(count<3){ try { stmt=con.createStatement(); String query="SELECT tblUsers.*, tblAccounts.* FROM tblUsers INNER JOIN tblAccounts ON tblUsers.loginid = tblAccounts.loginid WHERE tblUsers.loginid='"+tbLoginId.getText()+"' AND tblUsers.passwd='"+tbPassword.getText()+"'"; rs=stmt.executeQuery(query);

if(rs.next()) {

JOptionPane.showMessageDialog(null,"Welcome !"); fout=new FileWriter("c:\\windows\\temp\\Users.dat"); bwrite=new BufferedWriter(fout); bwrite.write(tbLoginId.getText()); bwrite.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"user-cpanel.html"), "_self"); } else

count++;

JOptionPane.showMessageDialog(null,"Sorry ! you are not a valid user ! you have only "+(3-count)+" attempts left!");

} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } }else { JOptionPane.showMessageDialog(null,"Your account has been locked ! Contact your nearest My Bank barnch"); }

} }

USER CPANEL
import java.io.*; import java.applet.*; import java.awt.*; import java.net.*; import javax.swing.*;

public class UserCPanel extends JApplet { FileReader fstream; public void init() { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) == null) { JOptionPane.showMessageDialog(null,strLine); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self"); } br.close(); } catch (FileNotFoundException fex)

{ try { getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self");

} catch(Exception ex_1) { ;; } } catch (Exception e) { ;; } }

ACCOUNT BALANCE
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class AccountBalance extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblAccountNo;

JComboBox cmbAccountNo;

JButton btnView;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

FileWriter fout;

public AccountBalance() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Account Number: ");

cmbAccountNo=new JComboBox();

btnView=new JButton("View");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

} public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(cmbAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'";

rs=stmt.executeQuery(query);

while(rs.next()) { cmbAccountNo.addItem(rs.getString(1)); } } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=6; add(btnView,gbc);

btnView.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnView) { try { stmt=con.createStatement();

String query="select * from tblAccounts where accountno='"+cmbAccountNo.getSelectedItem()+"'";

rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\account_balance.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Account Balance of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); while(rs.next()) {

dos.write("<tr><td><b>Name</td><td>"+rs.getString(3)+"</td></tr>");

dos.write("<tr><td><b>Currency</td><td>"+rs.getString(4)+"</td></tr>");

dos.write("<tr><td><b>Balance</td><td>"+rs.getString(5)+"</td></tr>"); dos.write("<tr><td><b>Hold Funds</td><td>"+rs.getString(6)+"</td></tr>"); dos.write("<tr><td><b>Uncleared Funds</td><td>"+rs.getString(7)+"</td></tr>"); dos.write("<tr><td><b>Overdraft Limit</td><td>"+rs.getString(8)+"</td></tr>"); dos.write("<tr><td><b>Amount to be swept in</td><td>"+rs.getString(9)+"</td></tr>"); dos.write("<tr><td><b>Available Balance</td><td>"+rs.getString(10)+"</td></tr>");

} dos.write("</table>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"account_balance.html"), "main_frame");

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } } }

ACCOUNT STATEMENT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class AccountSummary extends JApplet { private Connection con; Statement stmt; ResultSet rs;

FileReader fstream;

FileWriter fout;

public AccountSummary() {

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) {

try { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"' and accounttype='Saving'";

rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\account_summary.html"); BufferedWriter dos=new BufferedWriter(fout); dos.write("<h3>Saving Accounts</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Account No</th><th>Branch</th><th>Name</th><th>CCY</th><th>Available Balance</th></tr>"); while(rs.next()) {

dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(10)+"</td></tr>");

} dos.write("</table>"); dos.close(); //getAppletContext().showDocument(new URL(getCodeBase().toString() +"account_summary.html"), "main_frame");

stmt=con.createStatement(); query="select * from tblAccounts where loginid='"+strLine+"' and accounttype='Current'"; rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\account_summary.html",true); dos=new BufferedWriter(fout); dos.write("<h3>Current Accounts</h3><p>");

dos.write("<table border=1 width='100%'><tr align=center><th>Account No</th><th>Branch</th><th>Name</th><th>CCY</th><th>Available Balance</th></tr>"); while(rs.next()) {

dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(10)+"</td></tr>");

} dos.write("</table>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"account_summary.html"), "main_frame"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString());

} br.close(); } catch (FileNotFoundException fex) { JOptionPane.showMessageDialog(null,fex.toString()); } catch (Exception e)

{ JOptionPane.showMessageDialog(null,e.toString()); } } }

MINI STATEMENT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.FileReader;

public class MiniStatement extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblAccountNo, lblFrom, lblTo, lblShowTrans;

JComboBox cmbAccountNo, cmbFromDD, cmbFromMMM, cmbFromYY, cmbToDD, cmbToMMM, cmbToYY, cmbShowTrans;

JRadioButton rdoMiniStat, rdoSelectPeriod;

ButtonGroup bgroup;

JButton btnView;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

FileWriter fout;

public MiniStatement() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Account Number: "); lblFrom=new JLabel("From "); lblTo=new JLabel("To: "); lblShowTrans=new JLabel("Show Transactions: ");

cmbAccountNo=new JComboBox();

cmbFromDD=new JComboBox(); for(int i=1;i<=31;i++) cmbFromDD.addItem(i);

String [] strFromMMM={"1","2","3","4","5","6","7","8","9","10","11","12"}; cmbFromMMM=new JComboBox(strFromMMM);

String [] strFromYY={"11","12","13","14","15","16","17","18","19","20"}; cmbFromYY=new JComboBox(strFromYY);

cmbToDD=new JComboBox(); for(int i=1;i<=31;i++) cmbToDD.addItem(i);

String [] strToMMM={"1","2","3","4","5","6","7","8","9","10","11","12"}; cmbToMMM=new JComboBox(strToMMM);

String [] strToYY={"11","12","13","14","15","16","17","18","19","20"}; cmbToYY=new JComboBox(strToYY);

String [] strShowTrans={"All Transactions","Withdrawl","Deposit"}; cmbShowTrans=new JComboBox(strShowTrans);

rdoMiniStat=new JRadioButton("Mini Statement" , true); rdoSelectPeriod=new JRadioButton("Select Period" , false);

bgroup = new ButtonGroup(); bgroup.add(rdoMiniStat); bgroup.add(rdoSelectPeriod);

btnView=new JButton("View");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1;

add(cmbAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbAccountNo.addItem(rs.getString(1)); } } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST;

gbc.gridx=1; gbc.gridy=2; add(rdoMiniStat,gbc); rdoMiniStat.addActionListener(this);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(rdoSelectPeriod,gbc); rdoSelectPeriod.addActionListener(this);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(lblFrom,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=3; add(cmbFromDD,gbc); cmbFromDD.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=3; add(cmbFromMMM,gbc); cmbFromMMM.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=5; gbc.gridy=3; add(cmbFromYY,gbc); cmbFromYY.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=4; add(lblTo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=4; add(cmbToDD,gbc); cmbToDD.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=4; add(cmbToMMM,gbc); cmbToMMM.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=5; gbc.gridy=4;

add(cmbToYY,gbc); cmbToYY.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=5; add(lblShowTrans,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=5; add(cmbShowTrans,gbc); cmbShowTrans.setEnabled(false);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=6; add(btnView,gbc);

btnView.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnView) { try {

stmt=con.createStatement();

String query=""; if(rdoMiniStat.isSelected()) { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"'"; } else if(rdoSelectPeriod.isSelected()) { if(cmbShowTrans.getSelectedItem()=="Withdrawl") { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between #"+cmbFromMMM.getSelectedItem()+"/"+cmbFromDD.getSelectedItem()+"/"+cmbFromY Y.getSelectedItem()+"# and #"+cmbToMMM.getSelectedItem()+"/"+cmbToDD.getSelectedItem()+"/"+cmbToYY.getSel ectedItem()+"# and withdrawl > 0"; } else if(cmbShowTrans.getSelectedItem()=="Deposit") { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between #"+cmbFromMMM.getSelectedItem()+"/"+cmbFromDD.getSelectedItem()+"/"+cmbFromY Y.getSelectedItem()+"# and #"+cmbToMMM.getSelectedItem()+"/"+cmbToDD.getSelectedItem()+"/"+cmbToYY.getSel ectedItem()+"# and deposit > 0"; } else { query="select * from tblTransaction where accountno='"+cmbAccountNo.getSelectedItem()+"' and dttransaction between

#"+cmbFromMMM.getSelectedItem()+"/"+cmbFromDD.getSelectedItem()+"/"+cmbFromY Y.getSelectedItem()+"# and #"+cmbToMMM.getSelectedItem()+"/"+cmbToDD.getSelectedItem()+"/"+cmbToYY.getSel ectedItem()+"#"; } //JOptionPane.showMessageDialog(null,query); }

rs=stmt.executeQuery(query);

if(cmbShowTrans.getSelectedItem()=="Withdrawl") { fout=new FileWriter("c:\\wamp\\www\\mybank\\mini_statement_withdrawl.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Withdrawl</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7));

dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+wdrwl+"</td><td>"+(dpositwdrwl)+"</td><td>Dr</td></tr>");

} dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"mini_statement_withdrawl.html"), "main_frame");

} else if(cmbShowTrans.getSelectedItem()=="Deposit") { fout=new FileWriter("c:\\wamp\\www\\mybank\\mini_statement_deposit.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Deposit</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7));

dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+dposit+"</td><td>"+(dpositwdrwl)+"</td><td>Cr</td></tr>");

} dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"mini_statement_deposit.html"), "main_frame"); } else { fout=new FileWriter("c:\\wamp\\www\\mybank\\mini_statement.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Mini Statement of Account No:"+cmbAccountNo.getSelectedItem()+"</h3><p>"); dos.write("<table border=1 width='100%'><tr align=center><th>Date</th><th>Narration</th><th>Cheque/Ref. No</th><th>Value Date</th><th>Withdrawl</th><th>Deposit</th><th>Closing Balance</th><th>Cr/Dr</th></tr>"); while(rs.next()) { float dposit=Float.valueOf(rs.getString(8)); float wdrwl=Float.valueOf(rs.getString(7)); if(dposit==0)

dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+wdrwl+"</td><td>"+dposit+"</td><t d>"+(dposit-wdrwl)+"</td><td>Dr</td></tr>"); if(wdrwl==0)

dos.write("<tr><td>"+rs.getString(2)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.g etString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+wdrwl+"</td><td>"+dposit+"</td><t d>"+(dposit-wdrwl)+"</td><td>Cr</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close();

getAppletContext().showDocument(new URL(getCodeBase().toString() +"mini_statement.html"), "main_frame"); }

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } else if(evt.getSource()==rdoMiniStat) { cmbFromDD.setEnabled(false); cmbFromMMM.setEnabled(false); cmbFromYY.setEnabled(false); cmbToDD.setEnabled(false); cmbToMMM.setEnabled(false); cmbToYY.setEnabled(false); cmbShowTrans.setEnabled(false);

} else if(evt.getSource()==rdoSelectPeriod) { cmbFromDD.setEnabled(true); cmbFromMMM.setEnabled(true); cmbFromYY.setEnabled(true); cmbToDD.setEnabled(true); cmbToMMM.setEnabled(true); cmbToYY.setEnabled(true); cmbShowTrans.setEnabled(true); } } }

ADD BENIFICIARY
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class AddBenificiary extends JApplet implements ActionListener { JLabel lblAccountNo, lblName,lblEmail; JTextField tbAccountNo,tbName,tbEmail;

JButton btnRegister;

GridBagLayout gb; GridBagConstraints gbc;

private Connection con; Statement stmt;

FileReader fstream;

public AddBenificiary()

gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Benificiary Account No."); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");

tbAccountNo=new JTextField(15); tbName=new JTextField(15); tbEmail=new JTextField(15);

btnRegister=new JButton("Add");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !");

} } public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2; add(tbAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(lblName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(tbName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST;

gbc.gridx=3; gbc.gridy=1; add(lblEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=2; add(tbEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=2; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement();

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { String query="insert into tblTWB (benificiary_acno,benificiary_name,emailid, loginid) values('"+tbAccountNo.getText()+"','"+tbName.getText()+"','"+tbEmail.getText()+"','"+strLi ne+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Benificiary added successfully !"); tbAccountNo.setText(""); tbName.setText(""); tbEmail.setText(""); } else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,"This benificiary already added or this account does not exist in our bank ! Please check again."); } } catch(Exception ex_1)

{ JOptionPane.showMessageDialog(null,ex_1.toString()); } } }

ADD BENIFICIARY (NEFT)


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class AddBenificiaryNEFT extends JApplet implements ActionListener { JLabel lblAccountNo, lblAcType, lblIFSC, lblName,lblEmail; JTextField tbAccountNo, tbIFSC, tbName,tbEmail;

JComboBox cmbAcType; JButton btnRegister;

GridBagLayout gb; GridBagConstraints gbc;

private Connection con; Statement stmt;

FileReader fstream;

public AddBenificiaryNEFT() {

gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Benificiary Account No.: "); lblAcType=new JLabel("Account Type: "); lblIFSC=new JLabel("IFSC Code: "); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");

tbAccountNo=new JTextField(15); tbIFSC=new JTextField(15); tbName=new JTextField(15); tbEmail=new JTextField(15);

String [] strAcType={"Saving","Current"}; cmbAcType=new JComboBox(strAcType);

btnRegister=new JButton("Add");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); }

catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(tbAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2; add(lblAcType,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(cmbAcType,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(lblIFSC,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(tbIFSC,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=4; add(lblName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=4; add(tbName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST;

gbc.gridx=1; gbc.gridy=5; add(lblEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=5; add(tbEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=6; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement(); try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { String query="insert into tblTOB_NEFT (benificiary_acno, benificiary_actype, IFSC_code, benificiary_name,emailid, loginid) values('"+tbAccountNo.getText()+"','"+cmbAcType.getSelectedItem()+"','"+tbIFSC.getText( )+"','"+tbName.getText()+"','"+tbEmail.getText()+"','"+strLine+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Benificiary added successfully !"); tbAccountNo.setText(""); tbIFSC.setText(""); tbName.setText(""); tbEmail.setText(""); } else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } catch(Exception ex_1) {

JOptionPane.showMessageDialog(null,ex_1.toString()); } } }

ADD BENIFICIARY (RTGS)


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class AddBenificiaryRTGS extends JApplet implements ActionListener { JLabel lblAccountNo, lblIFSC, lblName,lblEmail; JTextField tbAccountNo, tbIFSC, tbName,tbEmail;

JComboBox cmbAcType; JButton btnRegister;

GridBagLayout gb; GridBagConstraints gbc;

private Connection con; Statement stmt;

FileReader fstream;

public AddBenificiaryRTGS() {

gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Benificiary Account No.: "); lblIFSC=new JLabel("IFSC Code: "); lblName=new JLabel("Benificiary Name/Nick Name"); lblEmail=new JLabel("Email ID");

tbAccountNo=new JTextField(15); tbIFSC=new JTextField(15); tbName=new JTextField(15); tbEmail=new JTextField(15);

btnRegister=new JButton("Add");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(tbAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(lblIFSC,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;

gbc.gridy=3; add(tbIFSC,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=4; add(lblName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=4; add(tbName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=5; add(lblEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=5; add(tbEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=6; add(btnRegister,gbc);

btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="insert into tblTOB_RTGS (benificiary_acno, IFSC_code, benificiary_name,emailid,loginid) values('"+tbAccountNo.getText()+"','"+tbIFSC.getText()+"','"+tbName.getText()+"','"+tbEm ail.getText()+"','"+strLine+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Benificiary added successfully !"); tbAccountNo.setText(""); tbIFSC.setText("");

tbName.setText(""); tbEmail.setText("");

} else JOptionPane.showMessageDialog(null,"Login id not found"); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } catch(Exception ex_1) { JOptionPane.showMessageDialog(null,ex_1.toString()); } } }

FUND TRANSFER WITHIN A BANK


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.util.Date.*; import java.text.*; public class TransWBank extends JApplet implements ActionListener { private Connection con; Statement stmt,stmt_1; ResultSet rs,rs_1; JLabel lblFromAccountNo, lblToAccountNo, lblTransDesc, lblTransAmount;

JTextField txtTransDesc, txtTransAmount;

JComboBox cmbFromAccountNo, cmbToAccountNo;

JButton btnTransfer;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

FileWriter fout;

public TransWBank() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");

txtTransDesc=new JTextField(15); txtTransAmount=new JTextField(10);

cmbFromAccountNo=new JComboBox(); cmbToAccountNo=new JComboBox();

btnTransfer=new JButton("Transfer");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

} public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblFromAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(cmbFromAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbFromAccountNo.addItem(rs.getString(1)); } } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1;

gbc.gridy=2; add(lblToAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(cmbToAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTWB where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbToAccountNo.addItem(rs.getString(1)); } }

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(lblTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(txtTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=2; add(lblTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=3; add(txtTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=6; add(btnTransfer,gbc);

btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

java.util.Date now = new java.util.Date(); DateFormat df = DateFormat.getDateInstance(); String s = df.format(now);

if((strLine = br.readLine()) != null) {

stmt_1=con.createStatement(); rs_1=stmt_1.executeQuery("select * from tblAccounts where accountno='"+cmbFromAccountNo.getSelectedItem()+"'");

while(rs_1.next()) {

if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {

int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

String query_2="update tblAccounts set availbalance=availbalance+"+txtTransAmount.getText()+" where accountno='"+cmbToAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_2);

stmt.executeUpdate(query_2);

String query_1="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,withdrawl, loginid,fromacno) values('"+s+"','"+cmbFromAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+

chkrefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbToAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query_1);

stmt.executeUpdate(query_1);

String query_3="update tblAccounts set availbalance=availbalance-"+txtTransAmount.getText()+" where accountno='"+cmbFromAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_3);

stmt.executeUpdate(query_3);

JOptionPane.showMessageDialog(null,"Amount Transferred successfully !");

txtTransAmount.setText(""); txtTransDesc.setText(""); } else {

JOptionPane.showMessageDialog(null,"Sorry! Balance not sufficient.");

} }

} else JOptionPane.showMessageDialog(null,"Login id not found");

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } } }

FUND TRANSFER TO OTHER BANK(NEFT)

import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.util.Date.*; import java.text.*; public class TransNEFTBank extends JApplet implements ActionListener { private Connection con; Statement stmt,stmt_1; ResultSet rs,rs_1; JLabel lblFromAccountNo, lblToAccountNo, lblTransDesc, lblTransAmount;

JTextField txtTransDesc, txtTransAmount;

JComboBox cmbFromAccountNo, cmbToAccountNo;

JButton btnTransfer;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

FileWriter fout;

public TransNEFTBank() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");

txtTransDesc=new JTextField(15); txtTransAmount=new JTextField(10);

cmbFromAccountNo=new JComboBox(); cmbToAccountNo=new JComboBox();

btnTransfer=new JButton("Transfer");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank");

} catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

} public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblFromAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(cmbFromAccountNo,gbc);

try

{ fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbFromAccountNo.addItem(rs.getString(1)); } } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2;

add(lblToAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(cmbToAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_NEFT where loginid='"+strLine+"' and verification=1"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbToAccountNo.addItem(rs.getString(1)); } if(cmbToAccountNo.getItemCount()==0) JOptionPane.showMessageDialog(null,"No NEFT benificiary verified yet !");

} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(lblTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(txtTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=2; add(lblTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=3; add(txtTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=6; add(btnTransfer,gbc);

btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

java.util.Date now = new java.util.Date(); DateFormat df = DateFormat.getDateInstance(); String s = df.format(now);

if((strLine = br.readLine()) != null) {

stmt_1=con.createStatement();

rs_1=stmt_1.executeQuery("select * from tblAccounts where accountno='"+cmbFromAccountNo.getSelectedItem()+"'");

while(rs_1.next()) {

if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {

int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

String query_2="update tblTOB_NEFT set availbalance=availbalance+"+txtTransAmount.getText()+" where benificiary_acno='"+cmbToAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_2);

stmt.executeUpdate(query_2);

String query_1="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,withdrawl, loginid,fromacno) values('"+s+"','"+cmbFromAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ chkrefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbToAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query_1);

stmt.executeUpdate(query_1);

String query_3="update tblTOB_NEFT set availbalance=availbalance-"+txtTransAmount.getText()+" where benificiary_acno='"+cmbFromAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_3);

stmt.executeUpdate(query_3);

JOptionPane.showMessageDialog(null,"Amount Transferred successfully !");

txtTransAmount.setText(""); txtTransDesc.setText(""); } else {

JOptionPane.showMessageDialog(null,"Sorry! Balance not sufficient.");

} } } else JOptionPane.showMessageDialog(null,"Login id not found");

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } } }

FUND TRANSFER TO OTHER BANK (USING RTGS)


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter; import java.util.Date.*; import java.text.*; public class TransRTGSBank extends JApplet implements ActionListener { private Connection con; Statement stmt,stmt_1; ResultSet rs,rs_1; JLabel lblFromAccountNo, lblToAccountNo, lblTransDesc, lblTransAmount;

JTextField txtTransDesc, txtTransAmount;

JComboBox cmbFromAccountNo, cmbToAccountNo;

JButton btnTransfer;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

FileWriter fout;

public TransRTGSBank() { gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblFromAccountNo=new JLabel("From Account Number: "); lblToAccountNo=new JLabel("To Account Number"); lblTransDesc=new JLabel("Transfer Description "); lblTransAmount=new JLabel("Transfer Amount");

txtTransDesc=new JTextField(15); txtTransAmount=new JTextField(10);

cmbFromAccountNo=new JComboBox(); cmbToAccountNo=new JComboBox();

btnTransfer=new JButton("Transfer");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); }

} public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblFromAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(cmbFromAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblAccounts where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbFromAccountNo.addItem(rs.getString(1)); } } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1;

gbc.gridy=2; add(lblToAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(cmbToAccountNo,gbc);

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_RTGS where loginid='"+strLine+"' and verification=1"; rs=stmt.executeQuery(query);

while(rs.next()) { cmbToAccountNo.addItem(rs.getString(1)); }

if(cmbToAccountNo.getItemCount()==0) JOptionPane.showMessageDialog(null,"No RTGS benificiary verified yet !"); } } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(lblTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(txtTransDesc,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=3; gbc.gridy=2; add(lblTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST;

gbc.gridx=3; gbc.gridy=3; add(txtTransAmount,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=4; gbc.gridy=6; add(btnTransfer,gbc);

btnTransfer.addActionListener(this); } public void actionPerformed(ActionEvent evt) { if(evt.getSource()==btnTransfer) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat");

BufferedReader br = new BufferedReader(fstream); String strLine;

java.util.Date now = new java.util.Date(); DateFormat df = DateFormat.getDateInstance(); String s = df.format(now);

if((strLine = br.readLine()) != null)

stmt_1=con.createStatement(); rs_1=stmt_1.executeQuery("select * from tblAccounts where accountno='"+cmbFromAccountNo.getSelectedItem()+"'");

while(rs_1.next()) {

if(Float.valueOf(rs_1.getString(10))>Float.valueOf(txtTransAmount.getText())) {

int chkrefno=(int)(Math.random()*1000); String query="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,deposit, loginid,fromacno) values('"+s+"','"+cmbToAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ch krefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbFromAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

String query_2="update tblTOB_RTGS set availbalance=availbalance+"+txtTransAmount.getText()+" where benificiary_acno='"+cmbToAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_2);

stmt.executeUpdate(query_2);

String query_1="insert into tblTransaction(dttransaction,accountno,narration, cheque_refno,withdrawl, loginid,fromacno) values('"+s+"','"+cmbFromAccountNo.getSelectedItem()+"','"+txtTransDesc.getText()+"','"+ chkrefno+"',"+txtTransAmount.getText()+",'"+strLine+"','"+cmbToAccountNo.getSelectedIt em()+"')";

//JOptionPane.showMessageDialog(null,query_1);

stmt.executeUpdate(query_1);

String query_3="update tblTOB_RTGS set availbalance=availbalance-"+txtTransAmount.getText()+" where benificiary_acno='"+cmbFromAccountNo.getSelectedItem()+"'";

//JOptionPane.showMessageDialog(null,query_3);

stmt.executeUpdate(query_3);

JOptionPane.showMessageDialog(null,"Amount Transferred successfully !");

txtTransAmount.setText(""); txtTransDesc.setText(""); } else {

JOptionPane.showMessageDialog(null,"Sorry! Balance not sufficient.");

} } } else JOptionPane.showMessageDialog(null,"Login id not found");

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } } }

VIEW BENIFICIARY WITHIN BANK


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class ViewBenificiary extends JApplet { private Connection con; Statement stmt; ResultSet rs;

FileReader fstream;

FileWriter fout;

public ViewBenificiary() {

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTWB where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\transfer_view_benificiary.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Your Benificiary within BANK:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {

dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiary.html"), "main_frame");

} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } }

VIEW BENIFICIARY OF OTHER BANK (NEFT)


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class ViewBenificiaryNEFT extends JApplet { private Connection con; Statement stmt; ResultSet rs;

FileReader fstream;

FileWriter fout;

public ViewBenificiaryNEFT() {

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_NEFT where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\transfer_view_benificiaryNEFT.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Your Benificiary NEFT Accounts:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>Benificiary Account Type</td><td><b>IFSC Code</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {

dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(5)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiaryNEFT.html"), "main_frame");

} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } }

VIEW BENIFICIRY OF OTHER BANK(USING RTGS)


import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class ViewBenificiaryRTGS extends JApplet { private Connection con; Statement stmt; ResultSet rs;

FileReader fstream;

FileWriter fout;

public ViewBenificiaryRTGS() {

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {

try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine;

if((strLine = br.readLine()) != null) { stmt=con.createStatement(); String query="select * from tblTOB_RTGS where loginid='"+strLine+"'"; rs=stmt.executeQuery(query);

fout=new FileWriter("c:\\wamp\\www\\mybank\\transfer_view_benificiaryRTGS.html"); BufferedWriter dos=new BufferedWriter(fout);

dos.write("<h3>Your Benificiary RTGS Accounts:</h3><p>"); dos.write("<table border=1 width='100%' cellpadding='3'>"); dos.write("<tr><td><b>Benificiary Account Number</td><td><b>IFSC Code</td><td><b>Benificiary Name</td><td><b>Email</td></tr>"); while(rs.next()) {

dos.write("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.g etString(3)+"</td><td>"+rs.getString(4)+"</td></tr>"); } dos.write("</table>"); dos.write("<p><a href='javascript:void(0)' onclick='javascript:print()'>Print this Statement</a></p>"); dos.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"transfer_view_benificiaryRTGS.html"), "main_frame");

} } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } }

CHANGE PASSWORD
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*; import java.io.*; import java.io.BufferedReader; import java.io.FileReader;

public class ChangePassword extends JApplet implements ActionListener { private Connection con; Statement stmt; ResultSet rs; JLabel lblLoginId, lblPassword; JPasswordField tbPassword,tbLoginId; JButton btnLogin;

GridBagLayout gb; GridBagConstraints gbc;

FileReader fstream;

public ChangePassword() {

gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblLoginId=new JLabel("New Password: "); lblPassword=new JLabel("Confirm Password: ");

tbLoginId=new JPasswordField(10); tbPassword=new JPasswordField(10);

btnLogin=new JButton("Change");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() {

setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblLoginId,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(tbLoginId,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2; add(lblPassword,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(tbPassword,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(btnLogin,gbc); btnLogin.addActionListener(this);

} public void actionPerformed(ActionEvent evt) { String pass=tbPassword.getText(); if(pass.length()>=5) { try { fstream = new FileReader("c:\\windows\\temp\\Users.dat"); BufferedReader br = new BufferedReader(fstream); String strLine; String passwd=tbLoginId.getText(); if((strLine = br.readLine()) != null && passwd.equals(tbPassword.getText())) { stmt=con.createStatement(); String query="update tblUsers set passwd='"+tbPassword.getText()+"' where loginid='"+strLine+"'";

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Password changed successfully !");

tbLoginId.setText(""); tbPassword.setText(""); } else

JOptionPane.showMessageDialog(null,"Password not matched ! Try again"); br.close(); } catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); }}else JOptionPane.showMessageDialog(null,"Password cannot be empty or less than 5 !"); } }

LOGOUT
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.net.*; import java.io.*; import java.io.BufferedWriter; import java.io.FileWriter;

public class Logout extends JApplet { FileWriter fout; BufferedWriter bwrite;

public void init() { try { JOptionPane.showMessageDialog(null,"The user Logged out successfully !"); fout=new FileWriter("c:\\windows\\temp\\Users.dat"); bwrite=new BufferedWriter(fout); bwrite.write(""); bwrite.close(); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self");

} catch(Exception ex) { JOptionPane.showMessageDialog(null,ex.toString()); } } }

USER REGISTRATION
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; import java.sql.*; import java.net.*;

public class UserRegistration extends JApplet implements ActionListener { JLabel lblAccountNo, lblName,lblContact,lblEmail, lblBranch; JTextField tbAccountNo,tbName,tbContact,tbEmail; JComboBox cmbBranch; JButton btnRegister;

GridBagLayout gb; GridBagConstraints gbc;

private Connection con; Statement stmt;

public UserRegistration() {

gb=new GridBagLayout(); gbc=new GridBagConstraints();

lblAccountNo=new JLabel("Account No.: "); lblName=new JLabel("Name: "); lblContact=new JLabel("Contact No.: "); lblEmail=new JLabel("Email ID: "); lblBranch=new JLabel("Branch: ");

tbAccountNo=new JTextField(10); tbName=new JTextField(10); tbContact=new JTextField(10); tbEmail=new JTextField(10);

String [] strBranch={"Solan","Shimla","Mandi"}; cmbBranch=new JComboBox(strBranch);

btnRegister=new JButton("Register Me");

try { Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection ("jdbc:odbc:my-bank"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null,"SQL Exception !"); } catch (ClassNotFoundException cex) {

JOptionPane.showMessageDialog(null,"SQL Exception !"); } } public void init() { setLayout(gb);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=1; add(lblAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=1; add(tbAccountNo,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=2; add(lblName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=2; add(tbName,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=3; add(lblContact,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=3; add(tbContact,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=4; add(lblEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=4; add(tbEmail,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=1; gbc.gridy=5; add(lblBranch,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2;

gbc.gridy=5; add(cmbBranch,gbc);

gbc.anchor=GridBagConstraints.NORTHWEST; gbc.gridx=2; gbc.gridy=6; add(btnRegister,gbc); btnRegister.addActionListener(this); } public void actionPerformed(ActionEvent evt) { try { stmt=con.createStatement(); String query="insert into tblRequest (accountno,name,contact,email,branch) values('"+tbAccountNo.getText()+"','"+tbName.getText()+"','"+tbContact.getText()+"','"+tbE mail.getText()+"','"+cmbBranch.getSelectedItem()+"')";

JOptionPane.showMessageDialog(null,query);

stmt.executeUpdate(query);

JOptionPane.showMessageDialog(null,"Request sent successfully !"); getAppletContext().showDocument(new URL(getCodeBase().toString() +"index.html"), "_self"); } catch(Exception ex)

{ JOptionPane.showMessageDialog(null,"Sorry ! Request might already made Or this Account does not exists !"); } } }

BENEFITS OF PROJECT

BENEFITS OF THE PROJECT

The main benefits of project are:

FUTURE SCOPE

BIBLOGRAPHY

BIBLOGRAPHY
Google.com Wikipedia.com Java

You might also like