0% found this document useful (0 votes)
59 views72 pages

Major-Project-BCA-ACHAL JAIN

The document describes a supermarket billing system project. It provides an overview of the project, discusses the purpose, scope and requirements. It also describes the existing manual system and proposed automated system using software. The system will allow storing customer and product data, generating bills and maintaining records.

Uploaded by

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

Major-Project-BCA-ACHAL JAIN

The document describes a supermarket billing system project. It provides an overview of the project, discusses the purpose, scope and requirements. It also describes the existing manual system and proposed automated system using software. The system will allow storing customer and product data, generating bills and maintaining records.

Uploaded by

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

A PROJECT REPORT ON

“SUPERMARKET BILLING SYSTEM”

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMEN FOR THE AWARD OF


THE DGREE BECHLORE OF COMPUTER APPLICATION

SESSION :2023-2024

Project Guide Name Submitted BY


External Guide (if any) : Achal Jain
None Enrollment No:
AX147246010
Internal Guide : Study Institute code No:
Harsh Vaish 7246
(BCA Faculty)

Submitted to
Makhanlal Chaturvedi National University of
Journalism and Communication, Bhopal
EXTOL INSTITUTE OF COMPUTER SCIENCE

Project Certificate
This is to certify that the project report entitled “SUPERMARKET BILLING SYSTEM”
submitted to Makhanlal Chaturvedi National University of Journalism & Communication, in
partial fulfillment of the requirement for the award of the degree of BACHELOR OF COMPUTER
APPLICATIONS (BCA), is original work carried out by myself Mr. Achal Jain with
enrolment no.AX147246010 Under the Supervision of Prof. Harsh Vaish.

The matter embodied in this project is genuine work done by myself and has not been
submitted whether to this University or to any other University / Institute for the
fulfillment of the requirement of any course of study.

Date: ..…/……/……
Name & Signature of the Student

………………......... …………….……

Contact Details (Email &Phone)


aadijain0095@gmail.com

number : 9981398541

Verified by the Supervisor

Name & Signature of the Supervisors

…………………….. .. ………………….

Date: ……/……/…….
Acknowledgement
This Major Project is the result of contribution of many mind. I would like to acknowledge
and thank my project guide HARSH SIR for his valuable support and guidance. He guided me
through the process from conception and till the completion of this project. I would also like to
thanks my class institute director KAMLESH SIR and my all my faculties JAMEELSIR . I thank to lab
staff members and other non-teaching members.

I am very thankful for the open-handed support extended by many people.


While no list would be complete, it is my pleasure to acknowledge the assistance of
my friends who provided encouragement, knowledge and constructive suggestions.

Signature of Student
Name: Achal Jain
Roll No :
Enrollment No :AX147246010
Self-Certificate

This is to certify that the Major Project report entitled “SUPERMARKET BILLING SYSTEM “is
done by me, and it is authentic work carried out for the partial fulfillment of the requirements
for the award of the degree of Bachelor of Computer Application(BCA) under the guidance of
“HARSH SIR”. The matter and software embodies in this project has not been submitted
earlier for award of any degree or diploma to the best of my knowledge and believes.

Signature of Student
ACHAL JAIN
Roll No:
Enrollment No: AX147246010
ABSTRACT

Supermarket Billing System is a stand-alone J2EE using Eclipse Juno


program. This project contains all the necessary required information about
maintaining the supermarket billing system.
The core idea of this project to minimize the paper work and centralize the
data. Here all the communication is taken in secure manner. That is, in this
application the information will be stored in client itself. For further security
the data base is stored in the back-end oracle and so no intruders can access it.
This application basically consists of a home page in which it provides means
to various other sections such as:

 Customer details
 Product details
 Material and purchase order details
 Banking details
 Bill generator

It also contains the descriptive specifications about the individual


categories respectively
INTRODUCTION Page
1.1 Overview no.
1.2 Purpose
1.3 Scope
1.4 Existing System
1.5 Proposed System
1.6 System Requirements
1.6.1 Hardware requirements
1.6.2 Software requirements
Programs and s/w used
LITERATURE SURVEY
2.1 Introduction to user requirements
2.2 User requirements
1.7 Development Environment
ANALYSIS AND DESIGN
3.1 Analysis
3.2 Design
2.3 3.3 E-R Diagrams

IMPLEMENTATION DETAILS
4.1 Coding
4.2 Testing
SCREEN SHOTS

Conclusion
6.1 Observation
6.2 Advantage
6.3 Future Enhancement
Bibliography
INTRODUCTION
1.1 Overview

The project is on Supermarket billing system. Supermarket is the place where


customers come to purchase their daily using products and pay for that. So there
is a need to calculate how many products are sold and to generate the bill for the
customer.
In our project employee of the super market will enter the data and stores data
into database and they generate the bill to customer of purchased items.

1.2 Purpose
The main purpose of this project is to provide a user friendly interface
commuters to easily manage and retrieve the information.
 In our project supermarket billing system we register employee and
customer information and store the information in database.
 Maintains of database of all related forms.
 Employee can make changes and generate the bill
1.3 Scope:

This project aims at developing system software which would cater to the
needs of the people. So we aim to implement such a system that allows the user
to have the facility at any place and access the required information. It can be
easily customized as per the requirements and available resources to suit the
needs of different users

1.4 EXISTINGSYSTEM
Many Supermarkets use this type of billing system for a decade. It is also
Improved many times according to requirements of sellers and customers. It
Does the same work that is calculating the bill, gives it to the customer and
Maintain proper database. They are accurate in calculation and printing, they
also generate records.
A new concept is also added in the billing system is that they also maintain
Relationships with the customers who purchase more products from the store
regularly. System also concerns their requirements and gives them more
commission. It also shows the overall profit and profit on a particular product
and give repots which items are required and which have cross their expiry
date..

1.5 ProposedSystem
The drawback of the existing system is that it is very difficult to retrieve
data from case files. It is difficult to handle the whole system manually and
it is less accurate and to keep the data in case files for future reference
because it may get destroyed. Moreover it is very difficult to retrieve data.
Redundancy of data may occur and this may lead to the inconsistency. The
manual system is so time-consuming. The proposed system is very easy to
operate. Speed and accuracy are the main advantages of proposed system.
There is no redundancy of data. The data are stored in the computer’s
secondary memories like hard disk, etc. it can be easily receive and used at
any time. The proposed system will easily handle all the data and the work
done by the existing systems. The proposed systems eliminate the
drawbacks of the existing system to a great extent and it provides tight
security to data.

1.6 System Requirements


1.6.1 Hardware requirements
SERVER:
Processor : Pentium IV
Speed : 1.7 GHz
Memory Capacity : 1 GB
Hard Disk Capacity : 80 GB

1.6.2 Software Requirements


Operating System : Windows 2000 Professional
Web Server : Apache Tomcat Web Server
Database : MYSQL
Enterprise Application : J2EE,
Implementation Architecture : MVC,
3 Tier using Servlets, JSP
Scripting Languages : Java Script
Programming Language : Java

1.7Programs and S/w used:


1.7.1 INTRODUCTION TO J2EE:
J2EE (Java 2 Platform, Enterprise Edition) is a Java platform designed for the
mainframe-scale computing typical of large enterprises. J2EE is also known as
Java EE, as subsequent versions have left behind the numeral. Designed J2EE to
simplify application development in a thin client tiered environment. J2EE
simplifies application development and decreases the need for programming
and programmer training by creating standardized, reusable modular
components and by enabling the tier to handle many aspects of programming
automatically.

1.7.2 INTRODUCTION TO ECLIPSE JUNO:


Eclipse Juno began as an IBM Canada project. Object Technology
International (OTI), which had previously marketed the Smalltalk-based Visual
Age family of integrated development environment (IDE) products, developed
the new product as a Java-based replacement. a consortium was formed with a
board of stewards to further the development of Eclipse as open-source
software.
1.7.3 INTRODUCTION TO JSP:
JSP Stands for "Java Server Page." This standard was developed by Sun
Microsystems as an alternative to Microsoft's active server page (ASP)
technology. JSP pages are similar to ASP pages in that they are compiled on the
server, rather than in a user's Web browser. After all, they don't call them
"server pages" for nothing. However, JSP is Java-based, whereas ASP is Visual
Basic-based. JSP pages are useful for building dynamic Web sites and accessing
database information on a Web server. Though JSP pages may have Java
interspersed with HTML, all the Java code is parsed on the server. Therefore,
once the page gets to the browser, it is only HTML. JavaScript, on the other
hand, is usually parsed by the Web browser, not the Web server.

1.7.4 INTRODUCTION TO CSS:


CSS CSS defines HOW HTML/JSP elements are to be displayed. CSS
describes the visual style (appearance, layout, color, fonts) of HTML/JSP
elements. CSS was designed to separate document layout from document
content (which greatly improved HTML/JSP flexibility and reduced HTML/JSP
complexity). CSS saves a lot of work! The CSS definitions are normally stored
in external files. This enables a web developer to change the appearance and
layout of every page in a web site, just by editing one single file! If you have
ever tried to change the style of all elements in all your HTML pages, you
understand how you can save a lot of work by storing the style definitions in an
external file.
1.7.5 INTRODUCTION TO JAVASCRIPT:
JavaScript is the scripting language of the Web. JavaScript is used in
billions of Web pages to add functionality, validate forms, communicate with
the server, and much more. JavaScript is easy to learn. JavaScript (JS) is an
interpreted computer programming language. It was originally implemented as
part of web browsers so that client-side scripts could interact with the user,
control the browser, communicate asynchronously, and alter the document
content that was displayed. JavaScript was formalized in the ECMAScript
language standard and is primarily used as part of a web browser (client-side
JavaScript). This enables programmatic access to computational objects within
a host environment.

1.7.6 INTRODUCTION TO SQL:


It is a database computer language designed for managing data in relation
database management system (RDBMS) and originally based upon relation
algebra. SQL is a declarative computer language for use with relation database.
Its scope includes data insert, query, update, delete, schema creation,
Modification, and data access control. It is the most widely used language for
relation database.
REQUIREMENTS
AND LITERATURE SURVEY

2.1 INTRODUCTION TO REQUIREMENTS


Since efficient application of software engineering concept during development of
software is much required , the software requirement specification(srs) of a software project
has to be thought over without any margin for errors .this will not only help complete the
project in specified deadline, but also save precious resources as the implementation of the
project proceeds.
Srs is basically a complete description of the behavior of a software system that is being
developed.
It includes a set of use cases that describe all the interactions that describe all the interactions
the user will have with the software, these are known as functional requirements. The non-
functional requirements of the srs are used to impose constraints on the design and
implements to maintain quality standards or design constraints

2.2 USER REQUIREMENTS


The primary requirements of our project we already listed out in brief in introduction.
For development of our project “super market management” we have taken care for
choosing the right requirements based on our experience based on our experience interacting
with customers of our booking lounge where we considered their valuable inputs in our
software requirements specification to design an effective user friendly and application
software

2.3 DEVELOPMENT ENVIROMENT


Choosing the right tools for development is critical for fast and efficient completion
of project to aid the development and implementation of our project, we did a survey of
available platforms, coding languages and tools and choose the one which met our
requirements and had support for an extensive set of libraries
ANALYSIS AND DESIGN

3.1Analysis:
Analysis is detailed study of the various operations performed by a system
and their relationship within and outside of the system. One aspect of analysis
the boundaries of the system and determining or not the system should consider
the other related system.
Structure analysis is a set of technique and graphical tools that allow the
analyst to develop a kind of system specification that are easily understandable
to the user. Its goal includes:

 Usage of graphics
would be helpful to communicate with the users.

 Usage of logical system


model will help user to familiarize the system characteristic and inter-
relationship before implementation.

Of course ER diagrams make it easy for the users to understand the flow
of data and control, but we have implemented the hierarchical structure to
represent the design structure of our project.
3.2 DESIGN:
INTRODUCTION TO DESIGN PHASES:
Software design is actually a multi-step process, which focuses on four
attributes of a program, ie, data structures, software architecture; interface
representation of the software that can be assessed for the quality before coding
begins. System study provides an understanding of the procedural details
necessary for implementing the system recommended in the feasibility study.
Basically it is all about the creation of a new system. This is a critical phase
since it decides the quality of the system and has a major impact on testing and
implementation phases.
This system document is a reference regarding the development of this
project. This document gives all the details of the modules present in this
project.

DESIGN OBJECTIVES AND PRINCIPLES:


The correctness of the design of a system depends on the level of precision
of the system built, which satisfies the requirements of the system. The aim of
the design is to produce the best possible design within the limitations imposed
by the requirements and facilities.
1. Verifiability.
2. Traceability.
3. Completeness.
4. Consistency.
5. Efficiency.
6. Simplicity.
The above mentioned properties would exhibit and integrate if the design
process were strictly followed during the development of the program.

3.3 ER DIAGRAMS OR DATAFLOW DIAGRAM


1. HOME PAGE

Customerdetails Bank account Item details

Product details HOME PAGE Material arrival

Purchase order Billing logout


2. CUSTOMER REGISTRATION FORM
Email
Fname Lname

Gender password
Customer registration

Address Phone
3. PRODUCT FORM

PRODUCT
NAME
SUPPLIER DATE
NAME

PRODUCT DETAILS

QUANTITY
PRODUCT
CODE
4. ITEM DETAILS FORM

CODE
NAME
MONTH/Y

EAR

CLOSING PRICE
ITEM DETAILS
STOCK

MDATE
STOCK EXP DATE
5. MATERIAL ARRIVAL FORM.
BILL NO
ARR NO
P ORDER

NO

STATUS ARR DATE


MATERIAL ARRIVAL

BILL DATE
REC SUPPLIER

VALUE
6. PURCHASE ORDER FORM

DEL NO
P ORDER
SUPPLIER
NO

PO NO STATUS
PURCHASE ORDER

PURC
DEL MODE PURC
ITEM DATE
7. BILLING FORM

CUSTOMER IDNO
COUNTER NO TOTAL ITEMS

BILLING BILL AMOUNT

AMOUNT PAID
NET BILL DISCOUNT
8. BANK ACCOUNT FORM

C-ID NO

CHEQUE CHEQUE
DATE NO

BANK ACCOUNT

AMOUNT
BANK
NAME
4. IMPLEMENTATION DETAILS
4.1 CODING

1 Login form

Jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


<title>Insert title here</title>
<%@include file="head.jsp"%>
</head>
<body bgcolor="white" text="SILVER" background="images\Blue-Abstract-
Vector-Background.jpg">

<form name="login" action="LoginServlet" method="post">


<CENTER>
<table>
<B>
<tr>
<td>User Name</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="pass"></td>
</tr>
<tr>
<td><input type="submit" value="Login"></td>
<td><input type="reset" value="Reset"></td>
</tr>
<tr><td>New user</td><td><a href="register.jsp">Sign </a>
</table>
</CENTER>
</B>
</form>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("login");

frmVal.addValidation("uname","req","Please enter User Name");


frmVal.addValidation("uname","maxlen=15","Max length for User Name is
15");

frmVal.addValidation("pass","req","Please enter Password");


frmVal.addValidation("pass","maxlen=8","Max length for Password 8");

</script>
</html>
SERVLET

package com.megainfo.servlet;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.megainfo.model.LoginModel;

publicclass LoginServlet extends HttpServlet {


privatestaticfinallongserialVersionUID = 1L;

protectedvoid doPost(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {
String name = request.getParameter("uname");
String pass = request.getParameter("pass");
ArrayList list = newArrayList();

HttpSession session = request.getSession();

LoginModel lm = new LoginModel();


try {
list = lm.loginModel(name, pass);
if(!list.isEmpty()){
session.setAttribute("name", name);
session.setAttribute("pass", pass);
response.sendRedirect("welcome.jsp");
}
else{
response.sendRedirect("invalid.jsp");
}

} catch (Exception e) {
//
e.printStackTrace();
}

}
MODEL:
package com.megainfo.model;

import java.sql.Connection;

import java.sql.ResultSet;

import java.sql.Statement;

import java.util.ArrayList;

import com.megainfo.common.DBConnection;

public class LoginModel {

private Connection con;

private Statement smt;

private ResultSet rs;

ArrayList<String> list = new ArrayList<String>();

public ArrayList loginModel(String name, String pass) throws


Exception {

String dbname="";

String dbpass="";

con = DBConnection.getConnection();

System.out.println("LoginMode::loginMode - Connection success...");

smt = con.createStatement();

System.out.println("LoginMode::loginMode - Statementcoustmer
created...");

rs = smt.executeQuery("select * from employee_table");

System.out.println("LoginMode::loginMode - Query exectued...");


while (rs.next()) {
dbname = rs.getString(5);

dbpass = rs.getString(6);

System.out.print(" LoginMode::loginMode - ResultSet..."+dbname);

If(dbname.equalsIgnoreCase(name)&&
dbpass.equalsIgnoreCase(pass)) {

List.add(name);

List.add(pass);

break;
}}

return list;

}
public static void main(String[] args)throws Exception {

// TODO Auto-generated method stub

ArrayList<String> list = new ArrayList<String>();

LoginModel lm = new LoginModel();

list = lm.loginModel("srinivas", "123");

System.out.println(list);

}}
WELCOME FORM

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
td {
font-size: 30px;
font-family: sans-serif;
padding-left: 20px;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" href="css/mm_spa.css" type="text/css" />
<%@include file="head.jsp"%>

</head>
<CENTER></CENTER>
<b><body text="black" bgcolor="black"
background="images/abstract-blue-vector-backgrounds-wallpapers.jpg">
<script language="JavaScript">
<!--
var name=prompt("Enter Your Name, Please.","name");
var today = new Date ()
var hrs = today.getHours();
document.writeln("<b>");
document.writeln("<b>");
if (hrs <= 12)
document.write("Good Morning "+name+'!');
elseif (hrs <= 18)
document.write("Good Afternoon "+name+'!');
else
document.write("Good Evening "+name+'!'); document.writeln("<br />");
// -->
</script>
<script>
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Satu
rday")
var montharray=new
Array("January","February","March","April","May","June","July","August","S
eptember","October","November","December")
document.write("<small><font color='black'
face='newtimesroman'><b>"+dayarray[day]+", "+montharray[month]+"
"+daym+", "+year+"</b></font></small>")

</script></b>

<img src="images\hudigi.jpg" height="400" width="400" align="right"


hspace="50" vspace="50">
<img src="images\Supermarket.jpg" height="400" width="400" vspace="50"
hspace="50" align="right">
</CENTER>
<br>
<br>
<br>
<table>
<tr>
<td><a href="register.jsp">Customer registration</a></td>
</tr>
<tr>
<td><a href="search_coustmer.jsp">Customer List</a></td>
</tr>
<tr>
<td><a href="edit_coustmer.jsp">Edit Customer</a></td>
</tr>

<tr>
<td><a href="PRODUCT.jsp">Product</a></td>
</tr>
<tr>
<td><a href="stock.jsp">Item Details</a></td>
</tr>

<tr>
<td><a href="materival arrival.jsp">MaterialArrival</a></td>
</tr>
<tr>
<td><a href="purchaseorder.jsp">PurchaseOrder</a></td>
</tr>
<tr>
<td><a href="billingform.jsp">Billing</a></td>
</tr>
<tr>
<td><a href="BANK AC FORM.jsp">BANK A/C</a></td>
</tr>

<tr>
<td><a href="logout.jsp">LogOut</a></td>
</tr>
</table>
</body>
</html>
PURCHASEORDERFORM
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" media="all"
href="css/jsDatePick_ltr.min.css" />
<script type="text/javascript" src="datepicker/datetimepicker.js"></script>
<style type="text/css">
#tst {
table-layout: auto;
display: table;
}
td,h1{
color:white;}
</style>

</head>
<body bgcolor="black" text="silver" background="images\Blue-Ground.jpg">
<CENTER>
<h1>PURCHASE ORDER</h1>
</CENTER>
<hr size="3" color="red">
<form name="mt" action="PURCHASESERVLET" method="POST">
<b>
<center>
<TABLE id="tst" border=1>
<TR>
<TD>PURCHASE ORDER NO:</TD>
<TD><SELECT NAME="PONO">
<option>smb23
<option>smb24
<option>smb25
</SELECT></TD>
</TR>
<TR>
<TD>DELIVERY NO:</TD>
<TD><SELECT NAME="DELNO"><option>smb12
<option>smb13
<option>smb14</SELECT></TD
</TR>
<TR>
<TD>SUPPILER:</TD>
<TD><SELECT NAME="SUPP">
<option>RAMESH
<option>SRINIVAS
<option>SANGAMESH
</SELECT></TD>
</TR>
<TR>
<TD>STATUS:</TD>
<TD><SELECT NAME="STATUS"><option>RECIEVED

<option>REJECTED</SELECT></TD>
</TR>
<TR>
<TD>PURCHASE DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="PODATE" SIZE="20"id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a></TD>
</TR>
<TR>
<TD>PURCHASE ITEM:</TD>
<TD><SELECT NAME="PURITEM">
<option>VEGETABLES
<option>FRUIT
<option>SPORTSITEM
<option>OTHER
</SELECT></TD>
</TR>
<TR>
<TD>DELIVERY MODE:</TD>
<TD><SELECT NAME="DELMODE">
<option>TEMPO
</SELECT></TD>
</TR>
<TR>
<TD>PO VALUE:</TD>
<TD><INPUT TYPE="TEXT" NAME="POVALUE" SIZE="20"></TD>
</TR>
</TABLE>
<BR><INPUT TYPE="SUBMIT" value="SUMBIT"><INPUT TYPE="RESET"
value="CLEAR">
</center
</b>
</form>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("mt");
frmVal.addValidation("PODATE","req","Please enter Purchase date");
frmVal.addValidation("PODATE","maxlen=5","Max length for Customer ID is
5");

frmVal.addValidation("POVALUE","req","Please enter po value");


frmVal.addValidation("POVALUE","maxlen=15","Max length for Check-in-
date is 15");
</script>
</html>
MATERIVAL ARRIVALFORM

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script language="javascript" type="text/javascript"
src="datepicker/datetimepicker.js">
</script>
<style type="text/css">
#tst {
table-layout: auto;
display: table;
}
#tst
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:100%;
border-collapse:collapse;
}
#tsttd,#tstth
{
font-size:1em;
border:1px solid #98bf21;
padding:3px 7px 2px 7px;
color :white;
}
#tstth
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
#tsttr.alttd
{
color:#000000;
background-color:#EAF2D3;
}

</style>
</head>
<body bgcolor="black" text="black"
background="images\pink-wallpaper-13.jpg">
<CENTER>
<h1>MATERIAL ARRIVAL</h1>
</CENTER>
<hr size="3" color="red">
<form name ="mt" action="Materivalarrivalservlet" method="POST">
<b>
<center>
<TABLE id="tst" border=1>
<TR>
<TD>ARRIVAL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRNO" SIZE="25"></TD>
</TR>
<TR>
<TD>BILL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLNO" SIZE="25"></TD>
</TR>
<TR>
<TD>PURCHASE ORDER NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="PONO" SIZE="25"></TD>
</TR>
<TR>
<TD>ARRIVAL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRDATE" SIZE="25" id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>BILL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLDATE" SIZE="25" id="bd"><a
href="javascript:NewCal('bd','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>SUPPILER:</TD>
<TD><INPUT TYPE="TEXT" NAME="SUPP" SIZE="25"></TD>
</TR>
<TR>
<TD>RECIEPT VALUE:</TD>
<TD><INPUT TYPE="TEXT" NAME="RECVAL" SIZE="25"></TD>
</TR>
<TR>
<TD>STATUS:</TD>
<TD><SELECT NAME="STATUS">
<option>Delivered
<option>Rejected
</SELECT></TD>

</TR>
</TABLE>
<BR><INPUT TYPE="SUBMIT" value="SUMBIT"><INPUT TYPE="RESET"
value="CLEAR">
</center>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("mt");
frmVal.addValidation("ARRNO","req","Please enter arrival no");
frmVal.addValidation("ARRNO","maxlen=5","Max length for Customer ID is
5");

frmVal.addValidation("BILLNO","req","Please enter billno");


frmVal.addValidation("BILLNO","maxlen=15","Max length for Check-in-date
is 15");

frmVal.addValidation("PONO","req","Please enter purchase order no");


frmVal.addValidation("PONO","maxlen=15","Max length Check-out-date is
15");

frmVal.addValidation("ARRDATE","req","Please enter the arrival date");


frmVal.addValidation("ARRDATE","maxlen=3","Max length for Total no of
members travelling is 3");

frmVal.addValidation("BILLDATE","req","Please enter bill date");


frmVal.addValidation("BILLDATE","maxlen=15","Max length for Total
amount charged 15");

frmVal.addValidation("SUPP","req","Please enter supplier");


frmVal.addValidation("SUPP","maxlen=15","Max length for Total amount
charged 15");

frmVal.addValidation("RECVAL","req","Please enter reciept value");


frmVal.addValidation("RECVAL","maxlen=15","Max length for Total amount
charged 15");

frmVal.addValidation("STATUS","req","Please enter status");


frmVal.addValidation("STATUS","maxlen=15","Max length for Total amount
charged 15");
</script>
</html>
PRODUCT FORM:

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>PRODUCT FROM</title>
<script language="javascript" type="text/javascript"
src="datepicker/datetimepicker.js">
</script>
<style type="text/css">
#tst{table-layout: auto;
display: table;
}
</style>
</head>
<body text=silver bgColor="black" background="images\Blue-Ground.jpg">
<CENTER>
<H1>PRODUCT FORM </H1></CENTER>
<HR color=red SIZE=3>

<FORM name ="pro" action="Productservlet" method=get><B>


<CENTER>
<TABLE id="tst" border=1>
<BODY>
<TR>
<TD>PRODUCT NAME:</TD>
<TD><INPUT type=text name=PDNO></TD>
</TR>
<TR>
<TD>DATE:</TD>
<TD><INPUT type=text name=DATE id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a></TD>
</TR>
<TR>
<TD>SUPPILER NAME:</TD>
<TD><INPUT type=text name=SUPPNAME></TD>
</TR>
<TR>
<TD>PRODUCT CODE:</TD>
<TD><INPUT type=text name=PROCD></TD>
</TR>
<TR>
<TD>QUANTITY:</TD>
<TD><INPUT type=text name=QUAN></TD>
</TR>
</TABLE>
<INPUT type=submit value=SUMBIT><INPUT type=reset value=CLEAR>
</CENTER>
</B>
</FORM>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("pro");
frmVal.addValidation("PDNO","req","Please enter Product no");
frmVal.addValidation("PDNO","maxlen=5","Max length for Customer ID is
5");

frmVal.addValidation("DATE","req","Please enter the date");


frmVal.addValidation("DATE","maxlen=15","Max length for Check-in-date is
15");

frmVal.addValidation("SUPPNAME","req","Please enter the supplier name");


frmVal.addValidation("SUPPNAME","maxlen=15","Max length Check-out-
date is 15");

frmVal.addValidation("PROCD","req","Please enter the product code");


frmVal.addValidation("PROCD","maxlen=3","Max length for Total no of
members travelling is 3");

frmVal.addValidation("QUAN","req","Please enter the quantity");


frmVal.addValidation("QUAN","maxlen=15","Max length for Total amount
charged 15");
</script>
</HTML>
SERVLET

package com.megainfo.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.megainfo.model.ProductModel;
import com.megainfo.model.RegisterModel;

public class Productservlet extends HttpServlet {


private static final long serialVersionUID = 1L;

public Productservlet() {
super();
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

String PDNO = request.getParameter("PDNO");


String DATE = request.getParameter("DATE");
String SUPPNAME = request.getParameter("SUPPNAME");
String PROCD = request.getParameter("PROCD");
String QUAN = request.getParameter("QUAN");

ProductModel pm = new ProductModel();


try {
boolean flag = pm.ProductModel( PDNO, DATE, SUPPNAME, SUPPNAME,
QUAN );
if (flag) {
response.sendRedirect("Databasesucess.jsp");
} else {
response.sendRedirect("register_failed.jsp");
}
} catch (Exception e) {
//
e.printStackTrace();
}
}
}

MODEL

package com.megainfo.model;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;

import com.megainfo.common.DBConnection;

public class PURCHASEMODEL {

private Connection con;


private Statement smt;
int i;
ArrayList list = new ArrayList();
boolean flag;

public boolean PURCHASEMODEL(String PONO, String DELNO,


String SUPP, String STATUS, String PODATE, String PURITEM,String
DELMODE,String POVALUE)
throws Exception {
String query = "insert into `purchasemodel`
(`PONO`,`DELNO`,`SUPP`,`STATUS`,`PODATE`,`PURITEM`,`DELMODE`
,`POVALUE`) values
('"+PONO+"','"+DELNO+"','"+SUPP+"','"+STATUS+"','"+PODATE+"','"+PU
RITEM+"','"+DELMODE+"','"+POVALUE+"')";
con = DBConnection.getConnection();
System.out.println("purchasemodel::loginMode - Connection success...");
smt = con.createStatement();
System.out.println("purchasemodel::loginMode - Statement created...");
System.out.println("PONO "+PONO+" DELNO "+DELNO+" SUPP "+SUPP+"
STATUS "+STATUS+" PODATE "+PODATE+" PURITEM "+PURITEM+"
DELMODE "+DELMODE+" POVALUE "+POVALUE+" ");
i = smt.executeUpdate(query);
System.out.println("LoginMode::loginMode - Query exectued..." + i);
if (i == 1) {
flag = true;
} else {
flag = false;
}
return flag;
}

REGISTRATION SUCCESS

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor="orange"
background="images\Light_green_Vector_flowers_abstract_backgrounds.jpg"
><br>
<img src="images\smileyface.jpg" align="right" height="200" width="200">
<h4><B><I>Thanks you have registered successfully!</I></B></h4>
<A HREF="welcome.jsp"> BACK</A>
</body>
</html>

INVALID USER

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Sorry Invalid user!
<a href="login.jsp">Try again</a>
</body>
</html>

LOGOUT

JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

</head>
<body><br><br><br>
<h4>Thanks, You have successfully logged out!!</h4>
<%
session.invalidate();
%>
</body>
</html>

NO_RECORDS

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title><style type="text/css">
</head>
<body bgcolor="orange"
background="images\Light_green_Vector_flowers_abstract_backgrounds.jpg"
>
<h5>Sorry No records!!</h5>
<a href="welcome.jsp">Go Back</a>
</body>
</html>

UPDATE CUSTOMER

JSP:
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
ArrayList list = newArrayList();
list = (ArrayList) session.getAttribute("empdetails");
System.out.println("List in JSP " + list);
%>
<form action="UpdatecoustmerServlet">
<table border="" width="800">
<tr>
<td>Employee No</td>
<td>First Name</td>
<td>Last Name</td>
<td>Email</td>
<td>Phone</td>
<td>Gender</td>
<td>Address</td>
</tr>
<%
for (int i = 0; i < list.size(); i = i + 7) {
%>
<tr>
<td><%=list.get(i)%></td>
<td><input type="text" name="fname" value="<%=list.get(i + 1)%>">
</td>
<td><input type="text" name="lname" value="<%=list.get(i + 2)%>">
</td>
<td><input type="text" name="email" value="<%=list.get(i + 3)%>">
</td>
<td><input type="text" name="phone" value="<%=list.get(i + 4)%>">
</td>
<td><input type="text" name="gender" value="<%=list.get(i + 5)%>">
</td>
<td><input type="text" name="address" value="<%=list.get(i + 6)%>">
</td>
</tr>
<%
}
%>
<tr>
<td><input type="hidden" name="empnumber"
value="<%=list.get(0)%>"></td>
<td colspan="4"><input type="submit" value="Update"></td>
</tr>
</table>
</form>
</body>
</html>

SERVLET
package com.megainfo.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.megainfo.model.Deletecoustmermodel;
import com.megainfo.model.UpdatecoustmerModel;

/**
* Servlet implementation class UpdateEmpServlet
*/
public class UpdatecoustmerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

/**
* @see HttpServlet#HttpServlet()
*/
public UpdatecoustmerServlet() {
super();
// TODO Auto-generated constructor stub
}

/**
* @see HttpServlet#doGet(HttpServletRequest request,
HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// TODO Auto-generated method stub
String empnumber = request.getParameter("empnumber");
String fname = request.getParameter("fname");
String lname = request.getParameter("lname");
String email = request.getParameter("email");
String phone = request.getParameter("phone");
String gender = request.getParameter("gender");
String address = request.getParameter("address");

System.out.println("UpdatecoustmerServlet:doGet() : emp_nois
"+empnumber);
HttpSession session = request.getSession();
UpdatecoustmerModel dm = new UpdatecoustmerModel();
boolean flag=false;
try {

flag = dm.updatecoustmerModel(empnumber, fname, lname, email, phone,


gender, address);
if (flag) {
response.sendRedirect("coustmer_update_success.jsp");
} else {
response.sendRedirect("no_records.jsp");
}

} catch (Exception e) {
e.printStackTrace();
}
}

MODEL
package com.megainfo.model;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import com.megainfo.common.DBConnection;
public class UpdatecoustmerModel {

private Connection con;


private Statement smt;
int i;
ArrayList list = new ArrayList();
boolean flag;
public boolean updatecoustmerModel(String coustmernumber, String
fname,String lname,String email,String phone,String gender, String
address)
throws Exception {
String query = "UPDATE coustmer_table SET
fname='"+fname+"',lname='"+lname+"',email='"+email+"',
phone='"+phone+"',gender='"+gender+"', address='"+address+"' WHERE
emp_no='"+coustmernumber+"';";
con = DBConnection.getConnection();
System.out.println("RegisterModel::loginMode - Connection success...");
smt = con.createStatement();
System.out.println("RegisterModel::loginMode - Statement created...");
i = smt.executeUpdate(query);
System.out.println("LoginMode::loginMode - Query exectued..." + i);
if (i == 1) {
flag = true;
} else {
flag = false;
}
return flag;
}
4.2 TESTING:

Scope of testing: once the code has been generated, the next task is testing.
Testing process mainly focuses on logical internals of the software, ensuring
that all statements are correct and ensure that defined input will produce an
actual result that is same as the expected results.
Test plan: testing process is divided into the following phases:
 Unit testing: It tests whether the data saves to all units of the databse
properly.
 Module testing: It tests all the modules created satisfies the user and
management.
 System testing: It tests the system so that it will not harm or change other
software or hardware indulging in the process.
 Acceptance testing: It plays the most important part, as it tests and
verifies that the software created is acceptable by the creator, user and
the customer. It checks for the fulfillments of all the requirements and is
accepted by everyone.

The following criteria and the corresponding tests are applied for each test
phase:
 Inter face integrity: internal and external interfaces are tested as each
module and are incorporated into the structure.
 Functional validity: test designed to uncover functional errors are
conducted.
 Information content: test designed to uncover errors associated with
local/global data structures are conducted.
 Performance: test designed to verify Performance bounds established
during design are conducted.
 Environment and resources: testing designed to cheek the adaptability of
the software on different environment.
5 SCREEN SHOTS
.
1. EMPLOYEE REGISTER FORM :
2.REGISTER SUCCESSFUL FORM.
3. LOGIN FORM.
4. HOME FORM
5. Customer Registration
6. UPDATE CUSTOMER FORM.
7. PRODUCT FORM
8. ITEM DETAILS FORM
9. MATERIAL
ARRIVAL
10.PURCHASE ORDER FORM
11. BILLING FORM
12. BANK ACCOUNT
13. details saved form

14. logout form


5.2 Database Tables:

1. BANKTABLE

2. BILLTABLE
3. CUSTOMER TABLE

4. EMPLOYEETABLE
5. ITEM TABLE

6.MATERIAL TABLE
7.PRODUCT TABLE

8.PURCHASE TABLE
CONCLUSION
6.1 Observations:

By looking at our project can observe some positive as well as some


negative factors. This project of SMB using J2EE and SQL was developed from
exam point of view. Many observations can be seen in this project. Some of the
important features provided in this project are;

 Eclipse for J2EE


 Concept of links to J2EE and SQL
 Structured query language.

6.2Advantage:

 Very simple
 Fast.
 Provides high capacity.
 Security for the information is provided.
 Centralized and persistent data storage.
 Visa processing system will in turn help in providing jobs.

6.3Future Enhancement:

 The project has a huge potential for expansion.


 New information on all the specified categories can be updated.
 We can make the GUI much clear and interactive by customization.
 The HPM system can be made more secure by having a secret key
sharing for the unlocking the visa process.
BIBLIOGRAPHY

We would like to specify the names of some guides, books and websites which
have paid us a lot and have helped us to complete this project

1. J2EE available at http://en.wikipedia.org/wiki/J2EE.


2. Text book of HTML and INTERNET TECHNOLOGY for Vth sem
BSc.
3. Our J2EE certificate course guide Mr. Ramesh M Karuti.
4. SQL table codes at http://www.w3schools.com/sql/default.asp.
5. JSP codes and format available at www.softcodes.com.
6. Wikipedia a free encyclopedia for codes and softwares.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy