Вы находитесь на странице: 1из 128

INDEX

• Acknowledment……………………………………………………………2
• Introduction………………………………………………………………...3
• Problem Defination………………………………………………………...4
• Proposed System…………………………………………………………...5
• Requirement Analysis……………………………………………………...6
o Feasiblity Study……………………………………………....6
o Data collection………………………………………………..7
o E-R diagram………………………………………………......8
o Normalization…………………………………………………9
• System design……………………………………………………………....11
o UML Diagrams……………………………………………....11
• I/O Screens………………………………………………………………….15
• Test Case Design…………………………………………………………....38
• Coding……………………………………………………………………….40
• Limitations and Futur Enhancement………………………………………...127
• Bibliography…………………………………………………………………128

1
ACKNOWLDEMENT

“It is not possible to prepare a project without the assistance & encouragement of other people. This
one is certainly no exception.”
On the very outset of this report, we would like to extend our sincere & heartfelt obligation towards
all the personages who have helped us in this endeavor. Without their active guidance, help, cooperation &
encouragement, we would not have made headway in the project.
We ineffably indebted to Mrs.Dhande and Mr.Gajare for conscientious guidance and encouragement
to accomplish this assignment.
We extend our gratitude to department of computer science for giving us this opportunity.
We also acknowledge with a deep sense of reverence, our gratitude towards our parents
and member of our family, who has always supported us morally as well as economically. At last but not least
gratitude goes to all of our friends who directly or indirectly helped us to complete this project.

2
INTRODUCTION
As we know, today computer is a part of our life, the development in computer
field can be referred as pre-dominating technology as on today. In our day-to-day life we need computers as
they work miracles in the twinkling of an eye.
The project deals with managing a jewellery store where sales of jewellery
services for women & men are done .In this jewellery management system the customer information is saved
for every new customer. The lists of items which are available for sale in store are entered in the system. Items
will be available in Gold, Silver, Platinum, Navaratna, etc. Each item has category like Necklace, Earrings,
Rings, Bracelet, Anklet, Bangles, etc.
It also provides services like custom jewellery design ,jewellery repair
,jewellery cleaning and inspection ,pearl stringing ,jewellery engraving ,financing ,etc. which is stored in system
along with customer details.
The system will always show customer information, total amount to be
received from customer as per their items purchase, services, total amount received from sales. List of items for
sale can be viewed.

HARDWARE REQUIREMENTS:
Hardware interface describe the logical and physical characteristics of each interface between the
software product and the hardware components of the system.

PROCESSOR : Dual core


HARD DISK : 40GB
RAM : 512MB
MONITOR : 15”SVGA Digital Color Monitor
PEN DRIVE : 512 MB
CD-ROM DRIVE : 52X
MODEM : D Link 56Kbps
KEY BOARD : 104 keys
MOUSE : Optical Mouse

SOFTWARE REQUIREMENTS:
Software interface describe the connections between this product and other specific software
components (name and version), including databases, operating systems, tools, libraries and integrated
commercial components. It describes the services needed and the nature of communications.

Front-End Design : Java


Back-End Database : MySql 5.1
Operating System : Windows XP, Vista, Windows 7, 8 ,8.1,10

3
PROBLEM DEFINATION
EXISTING SYSTEM:
At present all the activities are handled manually. Manual data processing system,
whole providing economy, flexibility and adaptability at low data volumes become more complex when the
volume of data becomes large. As an organization expands in size and function, a stage is reached when manual
procedures become inadequate and inefficient. No matter how many clerks are employed a stage is reached then
it becomes impossible to systemize such a large amount of information. What is required then is an upgrading
in the class of information processing technology.
The present system is not sufficient to hold all the information that is necessary for
the processing. So the library is in need of new computerized system, which is very flexible, user-friendly and
capable of holding the system in a robust manner. By computerizing the existing system, problems of existing
and its drawbacks can be eliminated a best result can be achieved.

LIMITATIONS OF EXISTING SYSTEM:


There were a lot of reasons for the introduction of the new system. They are mainly due
to the drawbacks and efficiency of the existing system.

1. Present working of jewellery system is manual.


2. Data is maintained in many registers. So data accuracy is minimum.
3. Lot of paper work makes the process of availability very slow.
4. Loss of information like customer does not remember order id or their product id so it is very slow and
time consuming job.
5. Details of amount are calculated manually and keeping track on pending balance from customers is not
done. So financial status is unknown.

4
PROPOSED SYSTEM

The system study phase studies the problem, identifies alternate solution, evaluates
these solutions and finally recommends best solution. The system gives the structure and function of the system.
A detailed system study is essential for developing an efficient system. The proposed system provides a better
user interface.

SCOPE OF PROPOSED SYSTEM:


1. Using login form for entering into the system only authorized user can use the software. So information
security and integrity can be maintained.
2. Proper management of manpower can be handled as information is stored and can be easily managed
by the staff.
3. Keeping record in details of each transaction is possible.
4. Information unavailability due to loss of record is eliminated.
5. Bill calculation of each customer is easy, saved and fast.
6. Also customer g order is generated along with delivery date of stitching order and amount of stitching
order is stored with orders.
7. Accounts of received amount per day or period wise is managed easily.
8. Efficient working of Boutique can be achieved.
9. Large amount of data can be handled by the system.
10. Various reports will be given by the system like customer data, product details, collection of amount
and pending amount.

5
REQUIRMENT ANALYSYS

FEASIBILITY STUDY
During system analysis, a feasibility study of the proposed system is carried out
to see whether it is beneficial to the organization.
The integration unit is currently manual. To get the detailed information on
production, bagging etc. large bundles of files have to be looked into. It is very time consuming affair. An
operator has to keep in mind or search a file for the details of the data. So working with the existing system is
quite tedious. Whereas considering the merits of the new system it is very beneficial. The results of the
feasibility study are given below:

TECHNICAL FEASIBILITY STUDY:


A computerized system will be technically more effective than the existing
manual system. People who are handling the current manual system are going to handle the computerized
Jewellery management system. The computerized software system will be easy for them to handle, use &
support them as per their requirement. The software system produces reports as per the requirements of the
people working & using the manual system to handle, sale of jewellery products, accept order or service order,
and take product details and receivable amounts from customers. Also bill reports are entered generated. So no
need of manual calculations. Also various records are maintained in the Jewellery system need to be authorized
maintaining them.
It is a study of resource availability that may affect the availability to achieve
an acceptable system. It is essential that the process of analysis and definition be conducted in parallel with an
assessment of technical feasibility.
It centers on the existing computer system and to what extent it can support the
proposed system. Though information in manual system is enormous, it is easily handled by the MySQL (which
is a RDBMS software). It is easy to find and buy a system, which support this software. So it is technically
feasible.

ECONOMIC FEASIBILITY STUDY:


Tremendous is the range of changes that accompanies the new technology.
Introduction of a computerized system has some merits and demerits can lead to monetary gains. The cost to
buy a computer system for running this software is quite cheap. So this system is economically feasible.

BEHAVIORAL FEASIBILITY STUDY:


The hierarchy of the new system is much better than the old. The new system
is very much user friendly and the operational cost is bearable. The maintenance and working of the new system
needs less human effort.

6
DATA COLLECTION
To design an application for Jewellery management system, some
information was necessarily required to know the actual scenario of nursery. Like-

 Information of stock. like types of product available in shop, tentative cost.


 Basic and initial need of jewellery.
 Differentiation between customers.
 Genarting bill automatically.
 Way of maintain and updating stock.
To gather this information we visited some shop. As most of the shop are still
working with manual systems, we visited websites of some big jewellery shops of India.
Also we used to methods-

QUESTIONNAIRE :
We have used questionnaire method for gathering data from existing system. The use of
questionnaires allows analyst to collect information about various aspects of a system from large no. of persons.
The use of standardized question format can yield more reliable data then interview and another techniques and
the wide distribution ensures greater anonymity for respondents, which can lead to more honest responses.
This method does not allow to analysts to observe the expressions or reactions, response may be
limited.
Analysts often use open-ended questionnaire to learn about feelings, opinions, general
experience to explore a problem.
The high cost of developing and distributing questionnaire demands that analysts carefully
consider the objective of the questionnaire and determine what structure will be most useful to study and most
easily understood by the respondents.

OBSERVATION :
Observation allows analysts to gain information they cannot obtain by any other
technique. Analysts can obtained finish and information about how activities are carried out, observe how
documents are handled. Experienced observer know what to look for & how to assess the significance of what
they observe. We have collected the information by using this technique.

7
E-R DIAGRAM

8
NORMALIZATION
1.Customer:
Field Type Null Key Default
cust_id int(11) NO Primary Key
cust_name varchar(15) NO
address varchar(50) NO
mobile_no varchar(10) NO Unique
res_no varchar(10) YES Unique NULL
mail_id varchar(30) YES Unique NULL
balance varchar(10) NO

2.Login:
Field Type Null Key Default
username varchar(20) NO Primary Key
password varchar(10) YES NULL

3.Product:
Field Type Null Key Default
prod_id int(11) NO Primary key
type_id int(11) YES NULL
prod_name varchar(30) NO
weight float NO
metal varchar(15) YES Foreign key NULL
rate float NO
sold varchar(10) YES NULL

4.Orders:
Field Type Null Key Default
ord_id int(11) NO Primary key
orderdesc varchar(30) NO
ord_date date NO
del_date date NO
cust_id int(11) YES Foreign key NULL
design_no int(11) YES NULL
advance float NO
totalamt float NO
completed int(11) NO

9
5.Service:
Field Type Null Key Default
service_id int(11) NO Primary key
service_desc varchar(30) NO
service_dt date NO
delivery_dt date NO
advance float NO
totalamt float NO
cust_id int(11) YES Foreign key NULL
completed int(11) NO

6.Bill:
Field Type Null Key Default
bill_no int(11) NO Primary key
cust_id int(11) YES Foreign key NULL
billdate date NO
amount float NO

7.Product type:
Field Type Null Key Default
type_id int(11) NO Primary key
type varchar(20) NO

8.Product rate:
Field Type Null Key Default
metal varchar(15) NO Primary key
rate float YES NULL

10
SYSTEM DESIGN
1 USE CASES AND USE CASE DIAGRAMS:
A use-case is a UML modeling element that describes how a user of the proposed system will interact
with the system to perform a discrete unit of work. It describes and signifies a single interact with the system to
perform a discrete unit of work. It describes and signifies a single interaction over time that has meaning for the
end user (person, machine or other system), and is required to leave the system in a complete state: either the
interaction completed or was rolled back to the initial state.

• A use case typically has requirements and constraints that describe the essential features and rules under
which it operates.
• A use case may have an associated Sequence diagram illustrating behavior over time – who does what
and to whom, when.
• A use case typically has scenarios associated with it that describe the work flow over time that produces
the end result. Alternate work flows (to capture exceptions, etc.) are also allowed.

A use case diagram captures use cases and actor interactions. It describes
the functional requirements of the system, the manner that outside things (actors) interact at the system boundary and
the response of the system.

11
2 SEQUENCE DIAGRAM:

A sequence diagram is a structures representation of behavior as a series of sequential steps over time. It is
used to depict work flow, message passing and how elements in general cooperate over time to achieve results.
A sequence diagram models a dynamic view of the interactions between model elements at runtime.
Sequence diagrams are commonly used as explanatory models for use case scenarios.

o Each sequence element is arranged in a horizontal sequence, with messages passing back
and forward between elements.
o An actor element may be used to represent the user initiating the flow of events.
o Stereotyped elements, such as boundary, control and entity, may be used to illustrate
screens, controllers and database items respectively.
o Each element has a dashed stem called a lifeline, where that element that exists and
potentially takes part in the illustrations.

Sequence diagram in UML, indicates how events cause transitions from object to object. Once examining
a use-case has identified events, the modeler creates a sequence diagram- a representation of how events cause
flow from one object to another as a function of time. The sequence diagram is a shorthand version of the use-
case. It represents key classes and the events that cause behavior to flow from class to class.

12
3 ACTIVITY DIAGRAM:

The UML activity diagram is used to indicate the flow of the interaction within a specific scenario
by means of graphical representation. An activity diagram uses rounded rectangles to imply a specific system
function, arrow to represent flow through the system, decision diamonds to deflect a branching decision and
solid horizontal lines to indicate that parallel activities are occurring.

13
4 CLASS DAIGRAM:

14
I/O SCREENS
WELCOME SCREENS

15
LOGIN SCREEN
1. Login screen

2.If invalid password then pop up messege as “Invalid Password…!!!”

16
3.If invalid user then pop up messege as “Invalid User”

4. Only 3 attempts are allowed.(for Security purposed)

17
5.If username and password both valid then it will pop up message “Login success”.

PRODUCT RATE SCREEN

18
1.If alphabet/Speciaal symbol typed.

2.Upadating product rate.

19
MASTER MENU
Master menu using both button and drop down menu.

JEWELLERY TYPE ENTRY FORM

20
1.When New button clicked ,product type id will automatic generated.

2.When Save button clicked without entering product type.

21
3.Product type created.

4. For delete and view button if product type id not mentioned.

22
5.When Delete button clicked.

6.When View button clicked.

23
7.If incorrect product type id is enterd (for delete and view)

PRODUCT ENTRY SCREEN

24
1.Save button clicked.

2.Delete product.

25
CUSTOMER ENTRY FORM

1.Customer name must be alphabets only.

26
2. Customer Mobile no and residance no must be digits only.

3.Mobile number must be 10 digits.

27
4.Invalid email id

5.Customer created.

28
SALE BILL ENTRY SCREEN
1.When New button clicked, bill no and bill date will be automatically generated.

2.Generate bill.

29
3.Print bill.

SALE ORDER ENTRY SCREEN


1.When New vutton clicked,sale order no, order date and delivery date will be automatically generated.

30
2.Sale order created.

SERVICE ORDER ENTRY SCREEN

31
1. Service Entered.

SALE ORDER DELIVERY SCREEN


1.Deliver Order.

32
2.View Order

3.If invalid order no.

33
SERVICE ORDER DELIVERY FORM
1.Deliver service order

2.View service order deliver.

34
VIEW ALL CUSTOMERS
1.View report.

2.Print report.

35
VIEW JEWELLERY FOR SALE
1.View report

VIEW PENDING SALE ORDER

36
VIEW PENDING SERVICE ORDERS

VIEW SALE BILLS


1.Viev report of particular customer.

37
TEST CASE DESIGN

INTRODUCTION:
Testing is the set of activities that can be planned in advanced and s conducted
systematically. Testing requires that the developer discard preconceived notions of the “correctness” of the
software just developed and overcome a conflict of interest that occurs when errors are encountered. Testing
principles are
 All tests should be traceable to customer requirements
 Testing should be planned long before the testing begins
 Testing should begin “in the small” and progress towards testing “in the large”.
 Exhaustive testing is not possible
 To be most effective, testing should be conducted by an independent third party.

Testing objective are


 Testing is the process of executing a program within the intent of finding an error.
 A good test case is one that has high probability of finding an as-yet-undiscovered error.
 A successful test is one that uncovers an as yet-undiscovered error

There are various testing strategies available to accommodate from low-level testing to high-level testing as
discussed below.

TEST PLAN
Testing is the major quality control measure employed during software development. In the project,
the first test considered is the unit testing. In this unit testing, each modules of the system are tested separately.
This is carried out during programming stage itself. Each module should work satisfactory as regard from the
module.
After the entire module are checked independently and completed then the integration testing is
performed to check whether there is any interface errors. Then those errors are verified and corrected.
And also the security test is performed to allow only authorized persons to this system. Finally, the
validation testing is performed to validate whether the customer requirements are stratified are not.

38
UNIT TESTING
The unit testing is carried out on coding. Here different modules are tested against the specifications
produced during design for the modules. Unit testing mainly focused first in the smallest and low level modules,
proceeding one at a time. Each module was tested against required functionally and test cases were developed to
test the boundary values.
Unit testing focuses verification effort on the smallest unit of software design the software component or
module. The unit test focuses on the internal processing logic and data structures within the boundary of the
component. This type of testing can be conducted in parallel for multiple components.

INTEGRATION TESTING:
Integration testing is a systematic technique for consulting the software architecture while at the
same time conducting test to uncover errors associated with interfacing. The objective is to take unit tested
components and build a program structure that has been dictated by design.

VALIDATION TESTING:
Validation testing is that validation succeeds when software functions in a manner that can be
reasonably expected by the user. Validation testing begins after the culmination of integration testing, software
is completely assembled as a package; interfacing errors have been uncovered and corrected.
The error detecting during this testing is
 Incorrect Function
 Input Condition Errors
 Database Error
 Performance Error
 Initialization and Interface Error

SECURITY TESTING:
Security testing verifies that protection mechanisms built into a system will, in fact,
protect it from improper penetration. The system security must, of course, be tested for invulnerability from
flank or rear attack.
Test case
 The system provides authentication by means of validating the username and password. It won’t allow
the user gives the exact password and username.

39
CODING
WELCOME: img.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Img extends JFrame implements ActionListener
{
ImageIcon img;
JButton b;
Container c;
public Img()
{
super("Jewellary Shop Management System");
c=getContentPane();
c.setLayout(null);

Toolkit kit=Toolkit.getDefaultToolkit();
Dimension screens=kit.getScreenSize();
int scrh=screens.height;
int scrw=screens.width;

img=new ImageIcon("ganesha.jpg");
b=new JButton(img);
b.setBounds(0,0,scrw,scrh);
b.addActionListener(this);

c.add(b);
c.setBackground(Color.BLACK);
b.setBackground(Color.BLACK);
setSize(scrw,scrh);
setLocation(0,0);
setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b)
{
Welcome w=new Welcome();
setVisible(false);
w.setVisible(true);
}
}

public static void main(String[] args)


{
new Img();
}
}
40
WELCOME: Welcome.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Welcome extends JFrame implements ActionListener
{
ImageIcon img;
JButton b;
JLabel ll;
Container c;
public Welcome()
{
super("Jewellary Shop Management System");
c=getContentPane();
c.setLayout(null);

Toolkit kit=Toolkit.getDefaultToolkit();
Dimension screens=kit.getScreenSize();
int scrh=screens.height;
int scrw=screens.width;

img=new ImageIcon("Welcome.png");
b=new JButton(img);
b.setBounds(0,0,scrw,scrh);

b.addActionListener(this);

c.add(b);
b.setBackground(Color.black);
c.setBackground(Color.BLACK);
setSize(scrw,scrh);
setLocation(0,0);
setVisible(true);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==b)
{
Login l=new Login();
setVisible(false);
l.setVisible(true);
}
}
}

41
LOGIN: Login.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.sql.*;

public class Login extends JFrame implements ActionListener


{
JLabel l,l1,l2,l3,l4;
JTextField t1,t2;
JButton ok,cancel;
Container c;
int ctr;
public Login()
{
super("LOGIN Screen");
c=getContentPane();
c.setLayout( null );
ctr=0;

l1=new JLabel ("Enter Username :");


l2=new JLabel("Enter Password :");
l3=new JLabel("Login Screen");
l4=new JLabel("Tara Jewellers");

ImageIcon img=new ImageIcon("login.jpg");


l=new JLabel (img);

ok=new JButton("OK");
cancel=new JButton("Cancel");

l1.setFont(new Font("Script MT Bold",Font.BOLD,20));


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setFont(new Font("Script MT Bold",Font.BOLD,30));
l4.setFont(new Font("Script MT Bold",Font.BOLD,40));

l4.setForeground(new Color(212,175,55));

t1=new JTextField();
t2=new JPasswordField();

t1.setFont(new Font("Script MT Bold",Font.BOLD,20));


t2.setFont(new Font("Script MT Bold",Font.BOLD,20));

ok.setFont(new Font("Script MT Bold",Font.BOLD,20));


cancel.setFont(new Font("Script MT Bold",Font.BOLD,20));

l.setBounds(0,0,1323,711) ;
l4.setBounds(350,50,850,70) ;
42
l3.setBounds(550,120,300,70) ;
l1.setBounds(500,230,150,40) ;
t1.setBounds(700,230,150,40);

l2.setBounds(500,300,180,40);
t2.setBounds(700,300,150,40);

ok.setBounds(650,420,100,50) ;
cancel.setBounds(780,420,100,50);

ok.addActionListener(this);
cancel.addActionListener(this);

c.add(l);
l.add(l4);
l.add(l3);

l.add(l1);
l.add(t1);

l.add(l2);
l.add(t2);

l.add(ok);
l.add(cancel);

Toolkit kit=Toolkit.getDefaultToolkit();
Dimension screens=kit.getScreenSize();
int scrh=screens.height;
int scrw=screens.width;

c.setBackground(Color.LIGHT_GRAY);

setSize(scrw,(scrh-25));
setLocation(0,0);
setVisible(true);
}

public void actionPerformed( ActionEvent ae )


{
Connection con;
Statement st;
ResultSet rs;
String un=null,pwd=null;
if(ae.getSource()==ok)
{
ctr++;
try
{
Class.forName("com.mysql.jdbc.Driver");
43
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

un=t1.getText();
pwd=t2.getText();
if(un==null || pwd==null)
{
JOptionPane.showMessageDialog(this,"Enter user name & password or Cancel" );
}
else
{
rs=st.executeQuery("select * from Login");
rs.next();
if(rs.getString("username").equals(un))
{
if(rs.getString("password").equals(pwd))
{

JOptionPane.showMessageDialog(this,"Login success");
setVisible(false);
Product_Rate m=new Product_Rate();
m.setVisible(true);
}
else
{
JOptionPane.showMessageDialog(this,"Invalid Password...!!!");
t1.setText(null);
t2.setText(null);
}
}
else
{
JOptionPane.showMessageDialog(this,"Invalid user");
t1.setText(null);
t2.setText(null);
}
if(ctr>=3)
{
JOptionPane.showMessageDialog(this," Sorry you have exceeded login limit.Please try later....!!!" );
System.exit(0);
}
}
}catch(Exception e){}
}
if(ae.getSource()==cancel)
{
this.setVisible(false);
System.exit( 0 );
}
}
}
44
PRODUCT RATE ENTRY SCREEN: Product_Rate.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import javax.swing.border.*;
public class Product_Rate extends JFrame implements ActionListener,KeyListener
{
JTextField t1,t2,t3,t4,t5;
JLabel l,l1,l2,l3,li1,li2,li3,li4,li5,l4,l5,l6,l7;
ImageIcon i1,i2,i3,i4,i5;
JButton Upd,Ext;
Connection cn1;
ResultSet rs,rs1;
Statement st;

public void con()


{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public Product_Rate()
{
super("Product Rate");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;
setSize( scrw , scrh );
setLocation( 0 , 0 );

i1=new ImageIcon("background.jpg");
li1 = new JLabel(i1);
li1.setBounds(0,0,scrw,scrh) ;

l = new JLabel("TARA JEWELLARS");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));

l1 = new JLabel("PRODUCT RATE ENTRY SCREEN");


l1.setFont(new Font("Garamond",Font.BOLD,30));
l1.setForeground( new Color(212,175,55));

l.setBounds(320,30,1000,100) ;
45
l1.setBounds(500,100,1000,100) ;

t1=new JTextField();
t1.setFont(new Font("MT Bold",Font.BOLD,20));

t2=new JTextField();
t2.setFont(new Font("MT Bold",Font.BOLD,20));

t3=new JTextField();
t3.setFont(new Font("MT Bold",Font.BOLD,20));

t4=new JTextField();
t4.setFont(new Font("MT Bold",Font.BOLD,20));

t5=new JTextField();
t5.setFont(new Font("MT Bold",Font.BOLD,20));

Upd=new JButton("Update");
Ext=new JButton("Proceed");
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));

l2=new JLabel("Gold 24K:");


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l2.setForeground(Color.WHITE);
l3=new JLabel("Gold 22K:");
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setForeground(Color.WHITE);
l4=new JLabel("Gold HMK:");
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setForeground(Color.WHITE);
l5=new JLabel("Silver:");
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setForeground(Color.WHITE);
l6=new JLabel("Diamond:");
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setForeground(Color.WHITE);

l7=new JLabel("Price/gm");
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setForeground(Color.WHITE);

l2.setBounds(450,250,200,30);
t1.setBounds(650,250,100,30);

l3.setBounds(450,350,200,30);
t2.setBounds(650,350,200,30);

l4.setBounds(450,450,150,30);
t3.setBounds(650,450,250,30);
46
l5.setBounds(450,550,150,30);
t4.setBounds(650,550,250,30);

l6.setBounds(450,650,150,30);
t5.setBounds(650,650,250,30);

l7.setBounds(650,200,150,30);

t1.setFont(new Font("MT Bold",Font.BOLD,20));


t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));

Upd.setBounds(1000,400,150,40);
Ext.setBounds(1000,500,150,40);

Upd.addActionListener(this);
Ext.addActionListener(this);
t1.addKeyListener(this);
t2.addKeyListener(this);
t3.addKeyListener(this);
t4.addKeyListener(this);
t5.addKeyListener(this);

c1.setLayout(null);
c1.add(li1);

li1.add(l);
li1.add(l1);
li1.add(l2);
li1.add(t1);
li1.add(l3);
li1.add(t2);
li1.add(l4);
li1.add(t3);
li1.add(l5);
li1.add(t4);
li1.add(l6);
li1.add(t5);
li1.add(l7);
li1.add(Upd);
li1.add(Ext);
setVisible(true);
}
public void cleartext()
{
t1.setText(null);
t2.setText(null);
t3.setText(null);
47
t4.setText(null);
t5.setText(null);
}

public void keyPressed(KeyEvent k)


{
if( k.getSource()==t1)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t1.setText(null);
}
}

if( k.getSource()==t2)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t2.setText(null);
}
}

if( k.getSource()==t3)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{
JOptionPane.showMessageDialog(this,"Enter only Digits" );
t3.setText(null);
}
}

if( k.getSource()==t4)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{
JOptionPane.showMessageDialog(this,"Enter only Digits" );
t4.setText(null);
}
}

if( k.getSource()==t5)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
48
else
{
JOptionPane.showMessageDialog(this,"Enter only Digits" );
t5.setText(null);
}
}
}
public void keyReleased(KeyEvent k) {}
public void keyTyped(KeyEvent k) {}

public void actionPerformed(ActionEvent a1)


{
con();
if(a1.getSource()==Upd)
{
try{
String ins=null;
ins="update prod_rate set rate="+t1.getText()+" where metal='GOLD 24K'";
st.executeUpdate(ins);

ins="update prod_rate set rate="+t2.getText()+" where metal='GOLD 22K'";


st.executeUpdate(ins);
ins="update prod_rate set rate="+t3.getText()+" where metal='GOLD HMK'";
st.executeUpdate(ins);
ins="update prod_rate set rate="+t4.getText()+" where metal='SILVER'";
st.executeUpdate(ins);
ins="update prod_rate set rate="+t5.getText()+" where metal='DIAMOND'";
st.executeUpdate(ins);

ins="update product set rate="+t1.getText()+" where upper(metal)='GOLD 24K'";


st.executeUpdate(ins);
ins="update product set rate="+t2.getText()+" where upper(metal)='GOLD 22K'";
st.executeUpdate(ins);
ins="update product set rate="+t3.getText()+" where upper(metal)='GOLD HMK'";
st.executeUpdate(ins);
ins="update product set rate="+t4.getText()+" where upper(metal)='SILVER'";
st.executeUpdate(ins);
ins="update product set rate="+t5.getText()+" where upper(metal)='DIAMOND'";
st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Rate Updated");
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
else
if(a1.getSource()==Ext)
{
MasterMenu m=new MasterMenu();
this.setVisible(false);
m.setVisible(true);
}
}
}
49
MASTERMENU: MasterMenu.java
import java.awt.*;
import java.awt.image.*;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import java.sql.*;

public class MasterMenu extends JFrame implements ActionListener


{
Container c;
ImageIcon ii;
JLabel l,l1,l2,li;
MenuItem mm1,mm2,mm3,mm4,mm5,mm6,mm7,mm8,mm9,mm10,mm11,mm12,mm13,mm14,mm15;
ImageIcon i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14;

JButton m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m15,m16,m17;
public MasterMenu()
{
super("MENU");
c = getContentPane();

ii = new ImageIcon( "master.jpg" );


l = new JLabel(ii);
setLayout( null );
setVisible(true);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

l1 = new JLabel("Jewellery System Menu Screen");


l1.setFont(new Font("Garamond",Font.BOLD,40));
l1.setForeground( new Color(212,175,55));

l1.setBounds(500,60,850,70) ;

l.setBounds(-20,-20,scrw,scrh);
MenuBar mbar=new MenuBar();

li = new JLabel("TARA JEWELLARS");


li.setFont(new Font("Garamond",Font.BOLD,40));
li.setForeground( new Color(212,175,55));
li.setBounds(320,25,400,40);

setBackground( Color.black);
setSize( scrw , scrh );
setLocation( 0 , 0 );
50
setFont(new Font("Arial",Font.BOLD,20));
mbar.setFont(new Font("Arial",Font.BOLD,20));
setMenuBar(mbar);

Menu mast1=new Menu(" Masters Screens ");


Menu tran1=new Menu(" Transaction Screens ");
Menu repo1=new Menu(" Reports ");
Menu ext1=new Menu(" Exit System ");
mast1.setFont(new Font("Arial",Font.BOLD,20));
tran1.setFont(new Font("Arial",Font.BOLD,20));
repo1.setFont(new Font("Arial",Font.BOLD,20));
ext1.setFont(new Font("Arial",Font.BOLD,20));

mm1=new MenuItem("Jewellary Type Entry Form");


mm2=new MenuItem("Jewellary Entry Form");
mm3=new MenuItem("Customer Entry Form");

mm4=new MenuItem("Sale Bill Entry Form");


mm5=new MenuItem("Jewellary Order Entry Form");
mm6=new MenuItem("Service Order Entry Form");
mm7=new MenuItem("Jewellary Order Delivery Form");
mm8=new MenuItem("Jewellary Service Order Delivery Form");

mm9=new MenuItem("View Customers");


mm10=new MenuItem("View Jewellary for Sale");
mm11=new MenuItem("View Pending Service Orders");
mm12=new MenuItem("View Pending Sales Orders");
mm13=new MenuItem("View Sales Bills");

mm15=new MenuItem("Exit");

mast1.add(mm1);
mast1.add(mm2);
mast1.add(mm3);

tran1.add(mm4);
tran1.add(mm5);
tran1.add(mm6);
tran1.add(mm7);
tran1.add(mm8);

repo1.add(mm9);
repo1.add(mm10);
repo1.add(mm11);
repo1.add(mm12);
repo1.add(mm13);

ext1.add(mm15);

mbar.add(mast1);
51
mbar.add(tran1);
mbar.add(repo1);
mbar.add(ext1);

mm1.addActionListener(this);
mm2.addActionListener(this);
mm3.addActionListener(this);
mm4.addActionListener(this);
mm5.addActionListener(this);
mm6.addActionListener(this);
mm7.addActionListener(this);
mm8.addActionListener(this);
mm9.addActionListener(this);
mm10.addActionListener(this);
mm11.addActionListener(this);
mm12.addActionListener(this);
mm13.addActionListener(this);
mm15.addActionListener(this);

JLabel mast=new JLabel("Masters");


JLabel tran=new JLabel("Transactions");
JLabel repo=new JLabel("Reports");
JLabel ext=new JLabel("Exit System");

mast.setBounds(460,130,100,30);
tran.setBounds(640,130,200,30);
repo.setBounds(880,130,100,30);
ext.setBounds(1100,130,150,30);

mast.setForeground( new Color(70,130,180));


tran.setForeground( new Color(70,130,180));
repo.setForeground( new Color(70,130,180));
ext.setForeground( new Color(70,130,180));

mast.setFont(new Font("MT Bold",Font.BOLD,25));


tran.setFont(new Font("MT Bold",Font.BOLD,25));
repo.setFont(new Font("MT Bold",Font.BOLD,25));
ext.setFont(new Font("MT Bold",Font.BOLD,25));

i1=new ImageIcon("b1s.jpg");
i2=new ImageIcon("b2s.jpg");
i3=new ImageIcon("b3s.jpg");
m1=new JButton(i1);
m2=new JButton(i2);
m4=new JButton(i3);

m1.setBounds(450,180,145,90);
m2.setBounds(450,280,145,90);
m4.setBounds(450,380,145,90);
i4=new ImageIcon("b4s.jpg");
i5=new ImageIcon("b5s.jpg");
52
i6=new ImageIcon("b6s.jpg");
i7=new ImageIcon("b7s.jpg");
i8=new ImageIcon("b8s.jpg");

m5=new JButton(i4);
m6=new JButton(i5);
m15=new JButton(i6);
m16=new JButton(i7);
m17=new JButton(i8);

m5.setBounds(650,180,145,90);
m6.setBounds(650,280,145,90);
m15.setBounds(650,380,145,90);
m16.setBounds(650,480,145,90);
m17.setBounds(650,580,145,90);

i9=new ImageIcon("b9s.jpg");
i10=new ImageIcon("b10s.jpg");
i11=new ImageIcon("b11s.jpg");
i12=new ImageIcon("b12s.jpg");
i13=new ImageIcon("b13s.jpg");
i14=new ImageIcon("b14.jpg");
m7=new JButton(i9);
m8=new JButton(i10);
m9=new JButton(i11);
m10=new JButton(i12);
m11=new JButton(i13);

m12=new JButton(i14);

m7.setBounds(880,180,145,90);
m8.setBounds(880,280,145,90);
m9.setBounds(880,380,145,90);
m10.setBounds(880,480,145,90) ;
m11.setBounds(880,580,145,90);

m12.setBounds(1100,180,181,177);
c.add(l);
l.add(li);
l.add(l1);
l.add(mast);
l.add(tran);
l.add(repo);
l.add(ext);

l.add(m1);
l.add(m2);
l.add(m4);
l.add(m5);
53
l.add(m6);
l.add(m15);
l.add(m16);
l.add(m17);

l.add(m7);
l.add(m8);
l.add(m9);
l.add(m10);
l.add(m11);
l.add(m12);

m1.addActionListener(this);
m2.addActionListener(this);
m4.addActionListener(this);
m5.addActionListener(this);
m6.addActionListener(this);
m7.addActionListener(this);
m8.addActionListener(this);
m9.addActionListener(this);
m10.addActionListener(this);
m11.addActionListener(this);
m12.addActionListener(this);
m15.addActionListener(this);
m16.addActionListener(this);
m17.addActionListener(this);

public void actionPerformed( ActionEvent ae )


{

if(ae.getSource()==m1 || ae.getSource()==mm1)

new JewelType().setVisible(true);

if(ae.getSource()==m2 || ae.getSource()==mm2)
new Product().setVisible(true);

if(ae.getSource()==m4 || ae.getSource()==mm3)
new Customer().setVisible(true);

54
if(ae.getSource()==m5 || ae.getSource()==mm4)
new SaleBillEntry().setVisible(true);

if(ae.getSource()==m6 || ae.getSource()==mm5)
new OrderEntryForm().setVisible(true);

if(ae.getSource()==m15 || ae.getSource()==mm6)
new ServiceEntryForm().setVisible(true);

if(ae.getSource()==m16 || ae.getSource()==mm7)
new OrderDeliveryForm().setVisible(true);

if(ae.getSource()==m17 || ae.getSource()==mm8)
new ServiceDeliveryForm().setVisible(true);

if(ae.getSource()==m7 || ae.getSource()==mm9)
new CustomerReport().setVisible(true);

if(ae.getSource()==m8 || ae.getSource()==mm10)
new ItemReport().setVisible(true);

if(ae.getSource()==m9 || ae.getSource()==mm11)
new PendingOrderReport().setVisible(true);

if(ae.getSource()==m10 || ae.getSource()==mm12)
new PendingServiceOrderReport().setVisible(true);

if(ae.getSource()==m11 || ae.getSource()==mm13)
new SaleBillReport().setVisible(true);
if(ae.getSource()==m12 || ae.getSource()==mm15)
{
this.setVisible(false);
System.exit( 0 );
}
}
}

55
JEWELLERY TYPE ENTRY FORM: JewelType.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import javax.swing.border.*;
public class JewelType extends JFrame implements ActionListener,KeyListener
{
JTextField t1,t2;
JLabel l,l1,l2,l3,li1,li2,li3,li4,li5;
ImageIcon i1,i2,i3,i4,i5;
JButton New,Upd,Del,View,Clear,Ext;
Connection cn1;
ResultSet rs;
Statement st;

public void con()


{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs=st.executeQuery("select * from prod_type");
}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public JewelType()
{
super("Produst Type Details");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,0,0));
setSize( scrw , scrh );
setLocation( 0 , 0 );

i1=new ImageIcon("background.jpg");
li1 = new JLabel(i1);
li1.setBounds(0,0,scrw,scrh) ;
li2 = new JLabel(i2);
li2.setBounds(0,150,150,150) ;
li3 = new JLabel(i3);
li3.setBounds(0,300,150,150) ;
li4 = new JLabel(i4);
li4.setBounds(0,450,150,150) ;
li5 = new JLabel(i5);
56
li5.setBounds(0,600,150,150) ;
l = new JLabel("TARA JEWELLARS");
l.setFont(new Font("Garamond",Font.BOLD,40));

l.setForeground( new Color(212,175,55));

l1 = new JLabel("PRODUCT TYPE ENTRY SCREEN");


l1.setFont(new Font("Garamond",Font.BOLD,30));
l1.setForeground( new Color(212,175,55));

l.setBounds(300,20,1000,50) ;
l1.setBounds(500,90,1000,50) ;

t1=new JTextField();
t1.setFont(new Font("Script",Font.BOLD,20));

t2=new JTextField();
t2.setFont(new Font("Script",Font.BOLD,20));

New=new JButton("New");
Upd=new JButton("Save");
Del=new JButton("Delete");
View=new JButton("View");
Ext=new JButton("Exit");
Clear=new JButton("Clear");
New.setFont(new Font("Script MT Bold",Font.BOLD,20));
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Del.setFont(new Font("Script MT Bold",Font.BOLD,20));

View.setFont(new Font("Script MT Bold",Font.BOLD,20));


Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));

l2=new JLabel("Product Type ID:");


l2.setForeground(Color.WHITE);
l2.setFont(new Font("Script MT Bold",Font.BOLD,20));

l3=new JLabel("Product Type:");


l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setForeground(Color.WHITE);
t1.setFont(new Font("MT Bold",Font.BOLD,20));
t2.setFont(new Font("MT Bold",Font.BOLD,20));

l2.setBounds(450,300,200,30);
t1.setBounds(650,300,100,30);

l3.setBounds(450,400,150,30);
t2.setBounds(650,400,250,30);

New.setBounds(950,200,100,40);
57
Upd.setBounds(950,280,100,40);
Del.setBounds(950,360,100,40);
Clear.setBounds(950,440,100,40);
View.setBounds(950,520,100,40);
Ext.setBounds(950,600,100,40);

New.addActionListener(this);
Upd.addActionListener(this);
Del.addActionListener(this);
Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);

t2.addKeyListener(this);
c1.setLayout(null);
c1.add(li1);
li1.add(li2);
li1.add(li3);
li1.add(li4);
li1.add(li5);
li1.add(l);
li1.add(l1);
li1.add(l2);
li1.add(t1);
li1.add(l3);
li1.add(t2);
li1.add(New);
li1.add(Upd);
li1.add(Del);
li1.add(Clear);
li1.add(View);
li1.add(Ext);
setVisible(true);
}
public void cleartext()
{
t1.setText(null);
t2.setText(null);
}

public void keyPressed(KeyEvent k)


{

if( k.getSource()==t2)
{
if(k.getKeyCode()==KeyEvent.VK_CAPS_LOCK || k.getKeyCode()==KeyEvent.VK_SHIFT ||
k.getKeyCode()==8 || Character.isLetter(k.getKeyChar()) || Character.isWhitespace(k.getKeyChar()))
{}
else
{
JOptionPane.showMessageDialog(this,"Enter only Alphabets" );
58
t2.setText(null);
}
}

}
public void keyReleased(KeyEvent k) {}
public void keyTyped(KeyEvent k) {}

public void actionPerformed(ActionEvent a1)


{
con();
try{
if(a1.getSource()==New)
{
cleartext();
rs=st.executeQuery("select type_id from prod_type");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
t2.requestFocus();
}
else
if(a1.getSource()==Upd)
{
if(t2.getText().equals(""))
JOptionPane.showMessageDialog(this,"Please Enter Type");
else
{
rs=st.executeQuery("select * from prod_type where type_id="+t1.getText());
if(rs.next())
JOptionPane.showMessageDialog(this,"Product type Info already exists");

else
{
String ins="insert into prod_type values("+t1.getText()+",'"+t2.getText()+"')";
st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Product Type created");
}
}
}
else
if(a1.getSource()==View)
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Product Type ID");
else
{
rs=st.executeQuery("select * from prod_type where type_id="+t1.getText());
59
if(rs.next())
{
t2.setText(rs.getString("type"));
}
else
JOptionPane.showMessageDialog(this,"No such Product Type Exists");
}
}
else

if(a1.getSource()==Clear)
{
cleartext();
}
else

if(a1.getSource()==Del)
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Product type ID");
else
{

rs=st.executeQuery("select * from prod_type where type_id="+t1.getText());


if(rs.next())
{
st.executeUpdate("delete from prod_type where type_id="+t1.getText());
cleartext();
JOptionPane.showMessageDialog(this,"Product Type Deleted");
}
else
JOptionPane.showMessageDialog(this,"No such Prod Type Exists");
}
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
}

60
JEWELLERY ENTRY FORM: Product.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import javax.swing.border.*;
public class Product extends JFrame implements ActionListener
{
JTextField t1,t2,t3,t4,t5;
JLabel l,l1,l2,l3,li1,li2,li3,li4,li5,l4,l5,l6,l7;
ImageIcon i1,i2,i3,i4,i5;
JButton New,Upd,Del,View,Clear,Ext;
Connection cn1;
ResultSet rs,rs1;
Statement st;
JComboBox typ,mt;
public void con()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs=st.executeQuery("select * from Product");
}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public Product()
{
super("Produst Type Details");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setSize( scrw , scrh );

setLocation( 0 , 0 );

i1=new ImageIcon("background.jpg");

li1 = new JLabel(i1);


li1.setBounds(0,0,scrw,scrh) ;

l = new JLabel("TARA JEWELLARS");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));
61
l1 = new JLabel("PRODUCT ENTRY SCREEN");
l1.setFont(new Font("Garamond",Font.BOLD,30));
l1.setForeground( new Color(212,175,55));

l.setBounds(320,30,1000,100) ;
l1.setBounds(500,100,1000,100) ;

t1=new JTextField();
t1.setFont(new Font("MT Bold",Font.BOLD,20));

t2=new JTextField();
t2.setFont(new Font("MT Bold",Font.BOLD,20));

t3=new JTextField();
t3.setFont(new Font("MT Bold",Font.BOLD,20));

t5=new JTextField();
t5.setFont(new Font("MT Bold",Font.BOLD,20));

mt=new JComboBox();
mt.addItem("Gold 24K");
mt.addItem("Gold 22K");
mt.addItem("Gold HMK");
mt.addItem("Silver");
mt.addItem("Diamond");

typ=new JComboBox();
try
{
con();
rs1=st.executeQuery("select * from prod_type");

while(rs1.next())
{
typ.addItem(rs1.getString("type"));
}
}catch(SQLException s){
}

New=new JButton("New");
Upd=new JButton("Save");
Del=new JButton("Delete");
View=new JButton("View");
Ext=new JButton("Exit");
Clear=new JButton("Clear");
New.setFont(new Font("Script MT Bold",Font.BOLD,20));
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Del.setFont(new Font("Script MT Bold",Font.BOLD,20));
62
View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));
mt.setFont(new Font("MT Bold",Font.BOLD,20));

l2=new JLabel("Product ID:");


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l2.setForeground(Color.WHITE);
l3=new JLabel("Select Product Type:");
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setForeground(Color.WHITE);
l4=new JLabel("Product Name:");
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setForeground(Color.WHITE);
l5=new JLabel("Weight(gms):");
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setForeground(Color.WHITE);
l6=new JLabel("Metal:");
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setForeground(Color.WHITE);

l7=new JLabel("Price:");
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setForeground(Color.WHITE);

l2.setBounds(450,200,200,30);
t1.setBounds(650,200,100,30);

l3.setBounds(450,280,200,30);
typ.setBounds(650,280,200,30);

l4.setBounds(450,360,150,30);
t2.setBounds(650,360,250,30);

l5.setBounds(450,440,150,30);
t3.setBounds(650,440,250,30);

l6.setBounds(450,520,150,30);
mt.setBounds(650,520,250,30);

l7.setBounds(450,600,150,30);
t5.setBounds(650,600,250,30);

t1.setFont(new Font("MT Bold",Font.BOLD,20));


t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
typ.setFont(new Font("MT Bold",Font.BOLD,20));

New.setBounds(1000,200,100,40);
Upd.setBounds(1000,280,100,40);
63
Del.setBounds(1000,360,100,40);
Clear.setBounds(1000,440,100,40);
View.setBounds(1000,520,100,40);
Ext.setBounds(1000,600,100,40);

New.addActionListener(this);
Upd.addActionListener(this);
Del.addActionListener(this);
Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);
mt.addActionListener(this);

t5.setEnabled(false);
c1.setLayout(null);
c1.add(li1);

li1.add(l);
li1.add(l1);
li1.add(l2);
li1.add(t1);
li1.add(l3);
li1.add(typ);
li1.add(l4);
li1.add(t2);
li1.add(l5);
li1.add(t3);
li1.add(l6);
li1.add(mt);
li1.add(l7);
li1.add(t5);
li1.add(New);
li1.add(Upd);
li1.add(Del);
li1.add(Clear);
li1.add(View);
li1.add(Ext);
setVisible(true);
}
public void cleartext()
{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t5.setText(null);
}

public void actionPerformed(ActionEvent a1)


{
64
con();

try{
if(a1.getSource()==mt)
{

String mn=(String)mt.getSelectedItem();
rs=st.executeQuery("select * from prod_rate where upper(metal)='"+mn+"'");
rs.next();
t5.setText(rs.getString("rate"));
}

if(a1.getSource()==New)
{
cleartext();
rs=st.executeQuery("select prod_id from Product");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
t2.requestFocus();
}
else
if(a1.getSource()==Upd)
{

String sn=(String)typ.getSelectedItem();
rs1=st.executeQuery("select * from prod_type where type='"+sn+"'");
rs1.next();
int tid=rs1.getInt(1);
String ins="insert into Product
values("+t1.getText()+","+tid+",'"+t2.getText()+"',"+t3.getText()+",'"+mt.getSelectedItem()+"',"+t5.getText()+"
,0)";
st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Product created");
}
else
if(a1.getSource()==View)
{

if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Product ID");
else
{
rs=st.executeQuery("select * from Product where prod_id="+t1.getText());
if(rs.next())
{
t2.setText(rs.getString("prod_name"));
t3.setText(rs.getString("weight"));
t4.setText(rs.getString("quality"));
t5.setText(rs.getString("price"));
65
int tid=rs.getInt("type_id");
rs1=st.executeQuery("select * from prod_type where type_id="+tid);
rs1.next();
typ.setSelectedItem(rs1.getString("type"));
}
else
JOptionPane.showMessageDialog(this,"Product does not Exists");
}
}
else

if(a1.getSource()==Clear)
{

cleartext();
}
else

if(a1.getSource()==Del)
{

if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Product ID");
else
{

rs=st.executeQuery("select * from Product where prod_id="+t1.getText());

if(rs.next())
{
st.executeUpdate("delete from Product where prod_id="+t1.getText());
cleartext();
JOptionPane.showMessageDialog(this,"Product Deleted");
}
else
JOptionPane.showMessageDialog(this,"No such Prod Exists");
}
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
}

66
CUSTOMER ENTRY FORM: Customer.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import javax.swing.border.*;
public class Customer extends JFrame implements ActionListener,KeyListener
{
JTextField t1,t2,t3,t4,t5,t6;
JLabel l,l1,l2,l3,li1,li2,l4,l5,l6,ll;
ImageIcon i1,i2,i3,i4,i5;
JButton New,Upd,Del,View,Clear,Ext;
Connection cn1;
ResultSet rs,rs1;
Statement st;
JComboBox typ;
public void con()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs=st.executeQuery("select * from Customer");
}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public Customer()
{
super("Customer Detail");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,0,0));
setSize( scrw , scrh );

setLocation( 0 , 0 );

i1=new ImageIcon("background.jpg");
li1 = new JLabel(i1);
li1.setBounds(0,0,scrw,scrh) ;

l = new JLabel("TARA JEWELLARS");


l.setFont(new Font("Garamond",Font.BOLD,40));
67
l.setForeground( new Color(212,175,55));

ll = new JLabel("CUSTOMER ENTRY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

l.setBounds(300,20,1000,50) ;
ll.setBounds(500,90,1000,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
t6=new JTextField();

New=new JButton("New");
Upd=new JButton("Save");
Del=new JButton("Delete");
View=new JButton("View");
Ext=new JButton("Exit");
Clear=new JButton("Clear");
New.setFont(new Font("Script MT Bold",Font.BOLD,20));
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Del.setFont(new Font("Script MT Bold",Font.BOLD,20));
View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));

l1=new JLabel("Customer ID:");


l1.setFont(new Font("Script MT Bold",Font.PLAIN,20));
l1.setForeground(Color.WHITE);

l2=new JLabel("Customer Name:");


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l2.setForeground(Color.WHITE);

l3=new JLabel("Address:");
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setForeground(Color.WHITE);

l4=new JLabel("Mobile NO:");


l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setForeground(Color.WHITE);

l5=new JLabel("Residance No:");


l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setForeground(Color.WHITE);
l6=new JLabel("E-Mail ID:");
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setForeground(Color.WHITE);
68
t1.setFont(new Font("MT Bold",Font.BOLD,20));
t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
t6.setFont(new Font("MT Bold",Font.BOLD,20));
l1.setBounds(450,180,200,30);
t1.setBounds(650,180,100,30);

l2.setBounds(450,260,150,30);
t2.setBounds(650,260,250,30);

l3.setBounds(450,340,150,30);
t3.setBounds(650,340,250,30);

l4.setBounds(450,420,150,30);
t4.setBounds(650,420,250,30);

l5.setBounds(450,500,150,30);
t5.setBounds(650,500,250,30);

l6.setBounds(450,580,150,30);
t6.setBounds(650,580,250,30);

New.setBounds(1000,180,100,40);
Upd.setBounds(1000,260,100,40);
Del.setBounds(1000,340,100,40);
Clear.setBounds(1000,420,100,40);
View.setBounds(1000,500,100,40);
Ext.setBounds(1000,580,100,40);

New.addActionListener(this);
Upd.addActionListener(this);
Del.addActionListener(this);
Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);
t4.addKeyListener(this);
t5.addKeyListener(this);
t2.addKeyListener(this);
c1.setLayout(null);
c1.add(li1);

li1.add(l);
li1.add(ll);

li1.add(l1);
li1.add(t1);
li1.add(l2);
li1.add(t2);
69
li1.add(l3);
li1.add(t3);
li1.add(l4);
li1.add(t4);
li1.add(l5);
li1.add(t5);
li1.add(l6);
li1.add(t6);

li1.add(New);
li1.add(Upd);
li1.add(Del);
li1.add(Clear);
li1.add(View);
li1.add(Ext);
setVisible(true);
}
public void cleartext()
{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);

public void keyPressed(KeyEvent k)


{

if( k.getSource()==t2)
{
if(k.getKeyCode()==KeyEvent.VK_CAPS_LOCK || k.getKeyCode()==KeyEvent.VK_SHIFT
||k.getKeyCode()==8 || Character.isLetter(k.getKeyChar()) || Character.isWhitespace(k.getKeyChar()))
{}
else
{

JOptionPane.showMessageDialog(this,"Enter only Alphabets" );


t2.setText(null);
}
}

if( k.getSource()==t4)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


70
t4.setText(null);
}
}

if( k.getSource()==t5)
{
if(k.getKeyCode()==8||Character.isDigit(k.getKeyChar())){}
else
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t5.setText(null);
}
}

}
public void keyReleased(KeyEvent k) {}
public void keyTyped(KeyEvent k) {}

public void actionPerformed(ActionEvent a1)


{
con();

try{

if(a1.getSource()==New)
{
cleartext();
rs=st.executeQuery("select cust_id from Customer");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
t2.requestFocus();
}
else
if(a1.getSource()==Upd)
{
if(t2.getText().equals(""))
JOptionPane.showMessageDialog(this,"Please Enter Customer");

String s1=t6.getText();

int a=s1.indexOf('@');
int b=s1.indexOf('.');

if(t4.getText().length()!=10)
71
{
JOptionPane.showMessageDialog(this,"Mobile number nust be 10 digits");

}
else
if(a==-1 || b==-1 || a>b )
{

JOptionPane.showMessageDialog(this,"Invalid email-id");
}
else
{
rs=st.executeQuery("select * from Customer where cust_id="+t1.getText());
if(rs.next())
JOptionPane.showMessageDialog(this,"Customer already exists");

else
{
String ins="insert into Customer
values("+t1.getText()+",'"+t2.getText()+"','"+t3.getText()+"','"+t4.getText()+"','"+t5.getText()+"','"+t6.getText()
+"',0)";

st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Customer created");
}
}

}
else
if(a1.getSource()==View)
{

if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Customer ID");
else
{
rs=st.executeQuery("select * from Customer where cust_id="+t1.getText());
if(rs.next())
{
t2.setText(rs.getString("cust_name"));
t3.setText(rs.getString("address"));
t4.setText(rs.getString("mobile_no"));
t5.setText(rs.getString("res_no"));
t6.setText(rs.getString("mail_id"));

}
else
JOptionPane.showMessageDialog(this,"Customer does not Exists");
}
}
else
72
if(a1.getSource()==Clear)
{

cleartext();
}
else

if(a1.getSource()==Del)
{

if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Customer ID");
else
{

rs=st.executeQuery("select * from Customer where cust_id="+t1.getText());

if(rs.next())
{
st.executeUpdate("delete from Customer where cust_id="+t1.getText());
cleartext();
JOptionPane.showMessageDialog(this,"Customer Deleted");
}
else
JOptionPane.showMessageDialog(this,"No such Customer Exists");
}
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}

else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}

73
SALE BILL ENTRY FORM: SaleBillEntry.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.text.*;

public class SaleBillEntry extends JFrame implements ActionListener ,ItemListener


{
JTextField
t1,t2,t3,t4,t5,s1,i1,r1,a1,s2,i2,r2,a2,s3,i3,r3,a3,s4,i4,r4,a4,s5,i5,r5,a5,w1,w2,w3,w4,w5,m1,m2,m3,m4,m5;
JTextArea ta;
ImageIcon img;
JLabel lo,ll,l,l0,l1,l2,l3,l4,l5,sr,in,rt,amt,il,vat,bamt,tamt,wt,lb;
JButton New,Upd,clear,Ext,Print;
java.awt.List item;
Connection cn1;
ResultSet rs,rs1,rs2;
Statement st;
String itm;
int ctr=0;
double tot=0;
JComboBox cust;
public void con()
{
try{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs1=st.executeQuery("select * from Product");
rs=st.executeQuery("select * from Bill");

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public SaleBillEntry()
{
super("Sale Bill Entry");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,150,0));
setSize( scrw , scrh );
setLocation( 0 , 0 );

74
img=new ImageIcon("background.jpg
l = new JLabel("TARA JEWELLARS ");
l.setFont(new Font("Garamond",Font.BOLD,30));
l.setForeground( new Color(212,175,55));

ll = new JLabel("SALE BILL ENTRY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

lo = new JLabel(img);
lo.setBounds(0,0,scrw,scrh);

l.setBounds(320,50,800,50) ;
ll.setBounds(500,100,800,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
s1=new JTextField();
i1=new JTextField();
r1=new JTextField();
a1=new JTextField();
s2=new JTextField();
i2=new JTextField();
r2=new JTextField();
a2=new JTextField();
s3=new JTextField();
i3=new JTextField();
r3=new JTextField();
a3=new JTextField();
s4=new JTextField();
i4=new JTextField();
r4=new JTextField();
a4=new JTextField();
s5=new JTextField();
i5=new JTextField();
r5=new JTextField();
a5=new JTextField();

m1=new JTextField();
m2=new JTextField();
m3=new JTextField();
m4=new JTextField();
m5=new JTextField();
w1=new JTextField();
w2=new JTextField();
w3=new JTextField();
w4=new JTextField();
w5=new JTextField();
75
New=new JButton("New");
Upd=new JButton("Save");
clear=new JButton("Clear");
Ext=new JButton("Exit");
Print=new JButton("Print");
cust=new JComboBox();
try
{
con();
rs2=st.executeQuery("select * from CUSTOMER
while(rs2.next())
{
cust.addItem(rs2.getString("cust_name")+" "+rs2.getString("mobile_no"));
}
}catch(SQLException s){
}

item=new java.awt.List();

try
{
con();
rs1=st.executeQuery("select * from product where sold<>1");
while(rs1.next())
{
item.addItem(rs1.getString("prod_name"));
}
}catch(SQLException s){
}

l1=new JLabel("Bill No:");


l2=new JLabel("Bill Date:");
l3=new JLabel("Select Customer:");
l4=new JLabel("Bill Amount:");
l5=new JLabel("Select Item");
sr=new JLabel("Sr.No.");
in=new JLabel("Item Name");
wt=new JLabel("Weight");
rt=new JLabel("Rate");
lb=new JLabel("Labour");

amt=new JLabel("Amount");
vat=new JLabel("Vat");
tamt=new JLabel("Total Amount");
bamt=new JLabel("Bill Amount");

l1.setFont(new Font("MT Bold",Font.BOLD,15));


l2.setFont(new Font("MT Bold",Font.BOLD,15));
l3.setFont(new Font("MT Bold",Font.BOLD,15));
l4.setFont(new Font("MT Bold",Font.BOLD,15));
76
l5.setFont(new Font("MT Bold",Font.BOLD,15));
sr.setFont(new Font("MT Bold",Font.BOLD,15));
rt.setFont(new Font("MT Bold",Font.BOLD,15));
in.setFont(new Font("M Bold",Font.BOLD,15));
wt.setFont(new Font("MT Bold",Font.BOLD,15));
lb.setFont(new Font("M Bold",Font.BOLD,15));

amt.setFont(new Font("MT Bold",Font.BOLD,15));


vat.setFont(new Font("MT Bold",Font.BOLD,15));
bamt.setFont(new Font("MT Bold",Font.BOLD,15));

tamt.setFont(new Font("MT Bold",Font.BOLD,15));


cust.setFont(new Font("MT Bold",Font.BOLD,15));
l1.setForeground(Color.WHITE);
l2.setForeground(Color.WHITE);
l3.setForeground(Color.WHITE);
l4.setForeground(Color.WHITE);
l5.setForeground(Color.WHITE);
sr.setForeground(Color.WHITE);
rt.setForeground(Color.WHITE);
in.setForeground(Color.WHITE);
wt.setForeground(Color.WHITE);
lb.setForeground(Color.WHITE);

amt.setForeground(Color.WHITE);
bamt.setForeground(Color.WHITE);
vat.setForeground(Color.WHITE);
tamt.setForeground(Color.WHITE);
t1.setFont(new Font("MT Bold",Font.BOLD,15));
t2.setFont(new Font("MT Bold",Font.BOLD,15));
t3.setFont(new Font("MT Bold",Font.BOLD,15));
t4.setFont(new Font("MT Bold",Font.BOLD,15));
t5.setFont(new Font("MT Bold",Font.BOLD,15));
s1.setFont(new Font("MT Bold",Font.BOLD,15));
i1.setFont(new Font("MT Bold",Font.BOLD,15));
r1.setFont(new Font("MT Bold",Font.BOLD,15));
a1.setFont(new Font("MT Bold",Font.BOLD,15));
s2.setFont(new Font("MT Bold",Font.BOLD,15));
i2.setFont(new Font("MT Bold",Font.BOLD,15));
r2.setFont(new Font("MT Bold",Font.BOLD,15));
a2.setFont(new Font("MT Bold",Font.BOLD,15));
s3.setFont(new Font("MT Bold",Font.BOLD,15));
i3.setFont(new Font("MT Bold",Font.BOLD,15));
r3.setFont(new Font("MT Bold",Font.BOLD,15));
a3.setFont(new Font("MT Bold",Font.BOLD,15));
s4.setFont(new Font("MT Bold",Font.BOLD,15));
i4.setFont(new Font("MT Bold",Font.BOLD,15));
r4.setFont(new Font("MT Bold",Font.BOLD,15));
a4.setFont(new Font("MT Bold",Font.BOLD,15));
s5.setFont(new Font("MT Bold",Font.BOLD,15));
i5.setFont(new Font("MT Bold",Font.BOLD,15));
77
r5.setFont(new Font("MT Bold",Font.BOLD,15));
a5.setFont(new Font("MT Bold",Font.BOLD,15));

m1.setFont(new Font("MT Bold",Font.BOLD,15));


m2.setFont(new Font("MT Bold",Font.BOLD,15));
m3.setFont(new Font("MT Bold",Font.BOLD,15));
m4.setFont(new Font("MT Bold",Font.BOLD,15));
m5.setFont(new Font("MT Bold",Font.BOLD,15));
w1.setFont(new Font("MT Bold",Font.BOLD,15));
w2.setFont(new Font("MT Bold",Font.BOLD,15));
w3.setFont(new Font("MT Bold",Font.BOLD,15));
w4.setFont(new Font("MT Bold",Font.BOLD,15));
w5.setFont(new Font("MT Bold",Font.BOLD,15));

c1.setLayout(null);
c1.add(lo);
lo.add(l);
lo.add(ll);

l1.setBounds(450,200,120,30);
t1.setBounds(600,200,120,30);

l2.setBounds(750,200,120,30);
t2.setBounds(900,200,120,30);

l3.setBounds(450,250,250,30);
cust.setBounds(600,250,300,30);

sr.setBounds(350,300,60,30);
in.setBounds(410,300,200,30);
wt.setBounds(620,300,50,30);
rt.setBounds(680,300,100,30);
lb.setBounds(790,300,50,30);
amt.setBounds(850,300,100,30);

l5.setBounds(960,300,150,30);
item.setBounds(960,330,200,150);

s1.setBounds(350,330,50,30);
i1.setBounds(410,330,200,30);
w1.setBounds(620,330,50,30);
r1.setBounds(680,330,100,30);
m1.setBounds(790,330,50,30);
a1.setBounds(850,330,100,30);

s2.setBounds(350,360,50,30);
i2.setBounds(410,360,200,30);
w2.setBounds(620,360,50,30);
r2.setBounds(680,360,100,30);
m2.setBounds(790,360,50,30);
78
a2.setBounds(850,360,100,30);

s3.setBounds(350,390,50,30);
i3.setBounds(410,390,200,30);
w3.setBounds(620,390,50,30);
r3.setBounds(680,390,100,30);
m3.setBounds(790,390,50,30);
a3.setBounds(850,390,100,30);

s4.setBounds(350,420,50,30);
i4.setBounds(410,420,200,30);
w4.setBounds(620,420,50,30);
r4.setBounds(680,420,100,30);
m4.setBounds(790,420,50,30);
a4.setBounds(850,420,100,30);

s5.setBounds(350,450,50,30);
i5.setBounds(410,450,200,30);
w5.setBounds(620,450,50,30);
r5.setBounds(680,450,100,30);
m5.setBounds(790,450,50,30);
a5.setBounds(850,450,100,30);

tamt.setBounds(720,480,150,30);
t4.setBounds(850,480,100,30);

vat.setBounds(720,510,150,30);
t3.setBounds(850,510,100,30);

bamt.setBounds(720,540,150,30);
t5.setBounds(850,540,100,30);

New.setBounds(1200,200,80,40);
Upd.setBounds(1200,300,80,40);
Print.setBounds(1200,400,80,40);
clear.setBounds(1200,500,80,40);
Ext.setBounds(1200,600,80,40);

New.addActionListener(this);
Upd.addActionListener(this);
Print.addActionListener(this);
Ext.addActionListener(this);
item.addItemListener(this);
lo.add(l1);
lo.add(t1);

lo.add(l2);
lo.add(t2);

lo.add(l3);
lo.add(cust);
79
lo.add(sr);
lo.add(in);
lo.add(rt);lo.add(lb);lo.add(wt);
lo.add(amt);

lo.add(s1);
lo.add(i1);
lo.add(w1);
lo.add(r1);
lo.add(m1);
lo.add(a1);

lo.add(s2);
lo.add(i2);
lo.add(w2);
lo.add(r2);
lo.add(m2);
lo.add(a2);

lo.add(s3);
lo.add(i3);
lo.add(w3);
lo.add(r3);
lo.add(m3);
lo.add(a3);

lo.add(s4);
lo.add(i4);
lo.add(w4);
lo.add(r4);
lo.add(m4);
lo.add(a4);

lo.add(s5);
lo.add(i5);
lo.add(w5);
lo.add(r5);
lo.add(m5);
lo.add(a5);

lo.add(l5);
lo.add(item);

lo.add(tamt);
lo.add(t4);

lo.add(vat);
lo.add(t3);
80
lo.add(bamt);
lo.add(t5);

lo.add(New);
lo.add(Upd);
lo.add(Print);
lo.add(clear);
lo.add(Ext);
t1.setEnabled(false);
t2.setEnabled(false);
setVisible(true);
}

public void cleartext()


{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
s1.setText(null);
i1.setText(null);
r1.setText(null);
a1.setText(null);
s2.setText(null);
i2.setText(null);
r2.setText(null);
a2.setText(null);
s3.setText(null);
i3.setText(null);
r3.setText(null);
a3.setText(null);
s4.setText(null);
i4.setText(null);
r4.setText(null);
a4.setText(null);
s5.setText(null);
i5.setText(null);
r5.setText(null);
a5.setText(null);
w1.setText(null);
w2.setText(null);
w3.setText(null);
w4.setText(null);
w5.setText(null);
m1.setText(null);
m2.setText(null);
m3.setText(null);
m4.setText(null);
m5.setText(null);
81
}
public void actionPerformed(ActionEvent a1)
{
con();
try{

if(a1.getSource()==New)
{
cleartext();
rs=st.executeQuery("select bill_no from bill");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
t2.requestFocus();
Calendar cal=Calendar.getInstance();

String dt1=cal.get(Calendar.YEAR)+"/"+cal.get(Calendar.DATE)+"/"+(cal.get(Calendar.MONTH)+1);
t2.setText(dt1);
}
else
if(a1.getSource()==Upd)
{

String cn=(String)cust.getSelectedItem();
String sn=cn.substring(0,cn.indexOf(" "));

String str="select * from customer where cust_name='"+sn+"'";


rs2=st.executeQuery(str);
rs2.next();
int cid=rs2.getInt(1);

String ins="insert into bill values("+t1.getText()+","+cid+",'"+t2.getText()+"',"+t5.getText()+")";


st.executeUpdate(ins);
//update sold=1 in product table

if(i1.getText().length()>0)
st.executeUpdate("update product set sold=1 where prod_name='"+i1.getText()+"'");
if(i2.getText().length()>0)
st.executeUpdate("update product set sold=1 where prod_name='"+i2.getText()+"'");
if(i3.getText().length()>0)
st.executeUpdate("update product set sold=1 where prod_name='"+i3.getText()+"'");
if(i4.getText().length()>0)
st.executeUpdate("update product set sold=1 where prod_name='"+i4.getText()+"'");
if(i5.getText().length()>0)
st.executeUpdate("update product set sold=1 where prod_name='"+i5.getText()+"'");
JOptionPane.showMessageDialog(this,"Bill Saved");
}
else
82
if(a1.getSource()==clear)
{
cleartext();
}
else if(a1.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public void itemStateChanged(ItemEvent i)
{
ctr++;
try{
itm=(String)item.getSelectedItem();
rs1=st.executeQuery("select * from product where prod_name='"+itm+"'");
rs1.next();
if(ctr==1)
{
s1.setText("1");
i1.setText(itm);
r1.setText(Integer.toString(rs1.getInt(6)));
w1.setText(Integer.toString(rs1.getInt(4)));
m1.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)*0.1));

a1.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)+Double.parseDouble(m1.getText())));

tot=tot+Double.parseDouble(a1.getText());
t4.setText(Double.toString(tot));
t3.setText(Double.toString(tot*0.01));
}
else
if(ctr==2)
{
s2.setText("2");
i2.setText(itm);
r2.setText(Integer.toString(rs1.getInt(6)));
w2.setText(Integer.toString(rs1.getInt(4)));
m2.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)*0.1));

a2.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)+Double.parseDouble(m2.getText())));

83
tot=tot+Double.parseDouble(a2.getText());
t4.setText(Double.toString(tot));
t3.setText(Double.toString(tot*0.01));
}
else
if(ctr==3)
{
s3.setText("3");
i3.setText(itm);
r3.setText(Integer.toString(rs1.getInt(6)));
w3.setText(Integer.toString(rs1.getInt(4)));
m3.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)*0.1));

a3.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)+Double.parseDouble(m3.getText())));

tot=tot+Double.parseDouble(a3.getText());
t4.setText(Double.toString(tot));
t3.setText(Double.toString(tot*0.01));
}
if(ctr==4)
{
s4.setText("4");
i4.setText(itm);
r4.setText(Integer.toString(rs1.getInt(6)));
w4.setText(Integer.toString(rs1.getInt(4)));
m4.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)*0.1));

a4.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)+Double.parseDouble(m4.getText())));

tot=tot+Double.parseDouble(a4.getText());
t4.setText(Double.toString(tot));
t3.setText(Double.toString(tot*0.01));
}
if(ctr==5)
{
s5.setText("5");
i5.setText(itm);
r5.setText(Integer.toString(rs1.getInt(6)));
w5.setText(Integer.toString(rs1.getInt(4)));
m5.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)*0.1));

a5.setText(Double.toString(rs1.getInt(6)*rs1.getInt(4)+Double.parseDouble(m5.getText())));
tot=tot+Double.parseDouble(a5.getText());
t4.setText(Double.toString(tot));
t3.setText(Double.toString(tot*0.01));
}

t5.setText(Double.toString(Double.parseDouble(t4.getText())+Double.parseDouble(t3.getText())));
}catch(Exception e){}
}
}
84
JEWELLERY ORDER ENTRY FORM: OrderEntryForm.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.text.*;

public class OrderEntryForm extends JFrame implements ActionListener ,KeyListener,ItemListener


{

JTextField t1,t2,t3,t4,t5,t6,t7;

ImageIcon img;
JLabel lo,ll,l,l0,l1,l2,l3,l4,l5,l6,l7,l8;
JButton New,Upd,View,Clear,Ext,Del;
JComboBox cust;
Connection cn1;
ResultSet rs,rs1;
Statement st;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");

cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel?user=root&amp;password=");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs1=st.executeQuery("select * from Customer");
rs=st.executeQuery("select * from orders");

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public OrderEntryForm()
{
super("Order Entry Form");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,150,0));
setSize( scrw , scrh );

setLocation( 0 , 0 );
85
img=new ImageIcon("background.jpg");

l = new JLabel("TARA JEWELLARS ");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));

ll = new JLabel("SALES ORDER ENTRY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

lo = new JLabel(img);
lo.setBounds(0,0,scrw,scrh);

l.setBounds(320,30,1000,50) ;
ll.setBounds(500,100,1000,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
t6=new JTextField();
t7=new JTextField();
New=new JButton("New");
Upd=new JButton("Save");
View=new JButton("View");
Ext=new JButton("Exit");
Del=new JButton("Delete");
Clear=new JButton("Clear");
New.setFont(new Font("Script MT Bold",Font.BOLD,20));
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Del.setFont(new Font("Script MT Bold",Font.BOLD,20));
View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));
cust=new JComboBox();
try
{
con();
rs1=st.executeQuery("select * from CUSTOMER");

while(rs1.next())
{
cust.addItem(rs1.getString("cust_name")+" "+rs1.getString("mobile_no"));
}
}catch(SQLException s){
}

l1=new JLabel("Sales Order No:");


86
l2=new JLabel("Select Customer Name:");
l3=new JLabel("Order Description:");
l4=new JLabel("Order Date:");
l5=new JLabel("Delivery Date:");
l6=new JLabel("Design No:");
l7=new JLabel("Advance Paid Rs:");
l8=new JLabel("Total Amount Rs:");
l1.setForeground(Color.WHITE);
l2.setForeground(Color.WHITE);
l3.setForeground(Color.WHITE);
l4.setForeground(Color.WHITE);
l5.setForeground(Color.WHITE);
l6.setForeground(Color.WHITE);
l7.setForeground(Color.WHITE);
l8.setForeground(Color.WHITE);
cust.setFont(new Font("MT Bold",Font.BOLD,20));
l1.setFont(new Font("Script MT Bold",Font.BOLD,20));
l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l8.setFont(new Font("Script MT Bold",Font.BOLD,20));
t1.setFont(new Font("MT Bold",Font.BOLD,20));
t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
t6.setFont(new Font("MT Bold",Font.BOLD,20));
t7.setFont(new Font("MT Bold",Font.BOLD,20));
c1.setLayout(null);
c1.add(lo);
lo.add(l);
lo.add(ll);

l1.setBounds(450,200,200,30);
t1.setBounds(680,200,100,30);

l2.setBounds(450,260,250,30);
cust.setBounds(680,260,300,30);

l3.setBounds(450,320,200,30);
t2.setBounds(680,320,300,30);

l4.setBounds(450,380,200,30);
t3.setBounds(680,380,150,30);

l5.setBounds(450,440,200,30);
t4.setBounds(680,440,150,30);

87
l6.setBounds(450,500,200,30);
t5.setBounds(680,500,150,30);

l7.setBounds(450,560,200,30);
t6.setBounds(680,560,150,30);
l8.setBounds(450,620,200,30);
t7.setBounds(680,620,150,30);

New.setBounds(1080,200,100,40);
Upd.setBounds(1080,280,100,40);
Del.setBounds(1080,360,100,40);
Clear.setBounds(1080,440,100,40);
View.setBounds(1080,520,100,40);
Ext.setBounds(1080,600,100,40);
t3.setEnabled(false);
t4.setEnabled(false);

New.addActionListener(this);
Upd.addActionListener(this);

Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);
t6.addKeyListener(this);
t7.addKeyListener(this);
cust.addItemListener(this);
lo.add(l1);
lo.add(t1);
lo.add(l2);
lo.add(cust);
lo.add(l3);
lo.add(t2);
lo.add(l4);
lo.add(t3);
lo.add(l5);
lo.add(t4);
lo.add(l6);
lo.add(t5);
lo.add(l7);
lo.add(t6);
lo.add(l8);
lo.add(t7);

lo.add(New);
lo.add(Upd);
lo.add(Del);
lo.add(Clear);
lo.add(View);
lo.add(Ext);
setVisible(true);
}
88
public void cleartext()
{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);
t7.setText(null);
}

public void keyPressed(KeyEvent k)


{
if(k.getSource()==t6)
{

if(!Character.isDigit(k.getKeyChar()))
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t6.setText(null);
}
}
if(k.getSource()==t7)
{

if(!Character.isDigit(k.getKeyChar()))
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t7.setText(null);
}
}

}
public void keyReleased(KeyEvent k)
{}
public void keyTyped(KeyEvent k)
{}

public void actionPerformed(ActionEvent a1)


{
con();

try{

if(a1.getSource()==New)
89
{
cleartext();
rs=st.executeQuery("select ord_id from orders");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
try{

Calendar cal=Calendar.getInstance();

String dt1=cal.get(Calendar.DATE)+"/"+(cal.get(Calendar.MONTH)+1)+"/"+cal.get(Calendar.YEAR);
SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy");

java.util.Date d1=sdf.parse (dt1);

String dt2=null;
int d=cal.get(Calendar.DATE);
cal.add(Calendar.DATE,8);
int dy=cal.get(Calendar.DATE);
if(dy<d)

dt2=cal.get(Calendar.DATE)+"/"+(cal.get(Calendar.MONTH)+1)+"/"+cal.get(Calendar.YEAR);
else
dt2=cal.get(Calendar.DATE)+"/"+cal.get(Calendar.MONTH)+"/"+cal.get(Calendar.YEAR);
t3.setText(dt1);
t4.setText(dt2);

}catch(Exception e){}

}
else
if(a1.getSource()==Upd)
{
String cn=(String)cust.getSelectedItem();
String sn=cn.substring(0,cn.indexOf(" "));

rs=st.executeQuery("select * from orders where ord_id="+t1.getText());


if(rs.next())
JOptionPane.showMessageDialog(this,"Order exists");
else
{
//sn=(String)cust.getSelectedItem();
rs1=st.executeQuery("select * from customer where cust_name='"+sn+"'");
rs1.next();
int cid=rs1.getInt(1);
String ins="insert into orders
values("+t1.getText()+",'"+t2.getText()+"','"+t3.getText()+"','"+t4.getText()+"',"+cid+","+t5.getText()+","+t6.g
etText()+","+t7.getText()+",0)";

90
st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Sales Order Entered");
}

}
else
if(a1.getSource()==View)
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Sales Order No:");
else
{
rs=st.executeQuery("select * from orders where ord_id="+t1.getText());
if(rs.next())
{

t2.setText(rs.getString("orderdesc"));
t3.setText(rs.getString("ord_date"));
t4.setText(rs.getString("del_date"));
t5.setText(rs.getString("design_no"));
t6.setText(rs.getString("advance"));
t7.setText(rs.getString("totalamt"));
int cid=rs.getInt("cust_id");
rs1=st.executeQuery("select * from Customer where cust_id="+cid);
rs1.next();
cust.setSelectedItem(rs1.getString("cust_name"));
}
else
JOptionPane.showMessageDialog(this,"No such Sales Order Number Exists");
}
}
else

if(a1.getSource()==Clear)
{

cleartext();
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public void itemStateChanged(ItemEvent i) {}

91
JEWELLERY SERVICE ORDER ENTRY FORM: ServiceEntryForm.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.text.*;

public class ServiceEntryForm extends JFrame implements ActionListener ,KeyListener,ItemListener


{

JTextField t1,t2,t3,t4,t5,t6;

ImageIcon img;
JLabel lo,ll,l,l0,l1,l2,l3,l4,l5,l6,l7;
JButton New,Upd,View,Clear,Ext,Del;
JComboBox cust;
Connection cn1;
ResultSet rs,rs1;
Statement st;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");

cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel?user=root&amp;password=");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs1=st.executeQuery("select * from Customer");
rs=st.executeQuery("select * from service");

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public ServiceEntryForm()
{
super("Service Entry Form");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,150,0));
setSize( scrw , scrh );

92
setLocation( 0 , 0 );

img=new ImageIcon("background.jpg");

l = new JLabel("TARA JEWELLARS ");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));

ll = new JLabel("SERVICE ORDER ENTRY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

lo = new JLabel(img);
lo.setBounds(0,0,scrw,scrh);

l.setBounds(320,10,1000,100) ;
ll.setBounds(500,100,1000,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
t6=new JTextField();
New=new JButton("New");
Upd=new JButton("Save");
View=new JButton("View");
Ext=new JButton("Exit");
Del=new JButton("Delete");
Clear=new JButton("Clear");
New.setFont(new Font("Script MT Bold",Font.BOLD,20));
Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));
Del.setFont(new Font("Script MT Bold",Font.BOLD,20));
View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));
cust=new JComboBox();
try
{
con();
rs1=st.executeQuery("select * from CUSTOMER");

while(rs1.next())
{
cust.addItem(rs1.getString("cust_name")+" "+rs1.getString("mobile_no"));
}
}catch(SQLException s){
}

93
l1=new JLabel("Service Order No:");
l2=new JLabel("Select Customer Name:");
l3=new JLabel("Service Description:");
l4=new JLabel("Service Order Date:");
l5=new JLabel("Service Delivery Date:");
l6=new JLabel("Advance Paid Rs:");
l7=new JLabel("Total Amount Rs:");

cust.setFont(new Font("MT Bold",Font.BOLD,20));


l1.setFont(new Font("Script MT Bold",Font.BOLD,20));
l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l1.setForeground(Color.WHITE);
l2.setForeground(Color.WHITE);
l3.setForeground(Color.WHITE);
l4.setForeground(Color.WHITE);
l5.setForeground(Color.WHITE);
l6.setForeground(Color.WHITE);
l7.setForeground(Color.WHITE);

t1.setFont(new Font("MT Bold",Font.BOLD,20));


t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
t6.setFont(new Font("MT Bold",Font.BOLD,20));

c1.setLayout(null);
c1.add(lo);
lo.add(l);
lo.add(ll);

l1.setBounds(450,200,200,30);
t1.setBounds(670,200,100,30);

l2.setBounds(450,260,220,30);
cust.setBounds(670,260,300,30);

l3.setBounds(450,320,200,30);
t2.setBounds(670,320,300,30);

l4.setBounds(450,380,200,30);
t3.setBounds(670,380,150,30);

l5.setBounds(450,440,200,30);
t4.setBounds(670,440,150,30);

94
l6.setBounds(450,500,200,30);
t5.setBounds(670,500,150,30);

l7.setBounds(450,560,200,30);
t6.setBounds(670,560,150,30);

New.setBounds(1000,200,100,40);
Upd.setBounds(1000,280,100,40);
Del.setBounds(1000,360,100,40);

Clear.setBounds(1000,440,100,40);
View.setBounds(1000,520,100,40);
Ext.setBounds(1000,600,100,40);

New.addActionListener(this);
Upd.addActionListener(this);

Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);
t2.addKeyListener(this);

cust.addItemListener(this);
lo.add(l1);
lo.add(t1);

lo.add(l2);
lo.add(cust);

lo.add(l3);
lo.add(t2);
lo.add(l4);
lo.add(t3);

lo.add(l5);
lo.add(t4);

lo.add(l6);
lo.add(t5);

lo.add(l7);
lo.add(t6);

lo.add(New);
lo.add(Upd);
lo.add(Del);
lo.add(Clear);
lo.add(View);
lo.add(Ext);
setVisible(true);
95
}

public void cleartext()


{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);

public void keyPressed(KeyEvent k)


{
if(k.getSource()==t4)
{

if(!Character.isDigit(k.getKeyChar()))
{

JOptionPane.showMessageDialog(this,"Enter only Digits" );


t4.setText(null);
}
}

}
public void keyReleased(KeyEvent k)
{}
public void keyTyped(KeyEvent k)
{}

public void actionPerformed(ActionEvent a1)


{
con();

try{

if(a1.getSource()==New)
{
cleartext();
rs=st.executeQuery("select service_id from service");
if(rs.last())
t1.setText(Integer.toString((rs.getInt(1)+1)));
else
t1.setText("1");
try{
96
Calendar cal=Calendar.getInstance();

String dt1=cal.get(Calendar.DATE)+"/"+(cal.get(Calendar.MONTH)+1)+"/"+cal.get(Calendar.YEAR);
SimpleDateFormat sdf=new SimpleDateFormat("dd/MM/yyyy");

java.util.Date d1=sdf.parse (dt1);

String dt2=null;
int d=cal.get(Calendar.DATE);
cal.add(Calendar.DATE,8);
int dy=cal.get(Calendar.DATE);
if(dy<d)

dt2=cal.get(Calendar.DATE)+"/"+(cal.get(Calendar.MONTH)+1)+"/"+cal.get(Calendar.YEAR);
else
dt2=cal.get(Calendar.DATE)+"/"+cal.get(Calendar.MONTH)+"/"+cal.get(Calendar.YEAR);
t3.setText(dt1);
t4.setText(dt2);

}catch(Exception e){}

}
else
if(a1.getSource()==Upd)
{
String cn=(String)cust.getSelectedItem();
String sn=cn.substring(0,cn.indexOf(" "));

rs=st.executeQuery("select * from service where service_id="+t1.getText());


if(rs.next())
JOptionPane.showMessageDialog(this,"Service exists");
else
{
//String sn=(String)cust.getSelectedItem();
rs1=st.executeQuery("select * from customer where cust_name='"+sn+"'");
rs1.next();
int cid=rs1.getInt(1);
String ins="insert into service
values("+t1.getText()+",'"+t2.getText()+"','"+t3.getText()+"','"+t4.getText()+"','"+t5.getText()+"','"+t6.getText()
+"',"+cid+",0)";

st.executeUpdate(ins);
JOptionPane.showMessageDialog(this,"Service Entered");
}

}
else
if(a1.getSource()==View)
97
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter service No:");
else
{
rs=st.executeQuery("select * from service where service_id="+t1.getText());
if(rs.next())
{

t2.setText(rs.getString("service_desc"));
t3.setText(rs.getString("service_dt"));
t4.setText(rs.getString("delivery_dt"));
t5.setText(rs.getString("advance"));
t6.setText(rs.getString("totalamt"));
int cid=rs.getInt("cust_id");
rs1=st.executeQuery("select * from Customer where cust_id="+cid);
rs1.next();
cust.setSelectedItem(rs1.getString("cust_name"));

}
else
JOptionPane.showMessageDialog(this,"No such Order Number Exists");
}
}
else

if(a1.getSource()==Clear)
{

cleartext();
}
else

if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);

}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public void itemStateChanged(ItemEvent i)
{}
public static void main(String[] args)
{
new ServiceEntryForm();
}
}

98
JEWELLERY ORDER DELIVERY FORM: OrderDeliveryForm.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;

public class OrderDeliveryForm extends JFrame implements ActionListener


{

JTextField t1,t2,t3,t4,t5,t6,t7,t8,t9;

ImageIcon img;
JLabel lo,ll,l,l0,l1,l2,l3,l4,l5,l6,l7,l8,l9;
JButton Upd,View,Clear,Ext;

Connection cn1;
ResultSet rs,rs1;
Statement st;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs1=st.executeQuery("select * from Customer");
rs=st.executeQuery("select * from orders");

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public OrderDeliveryForm()
{
super("Order Entry Form");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,150,0));
setSize( scrw , scrh );
setLocation( 0 , 0 );

img=new ImageIcon("background.jpg");

99
l = new JLabel("TARA JEWELLARS ");
l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));

ll = new JLabel("SALES ORDER DELIVERY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

lo = new JLabel(img);
lo.setBounds(0,0,scrw,scrh);

l.setBounds(320,30,1000,50) ;
ll.setBounds(500,100,1000,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
t6=new JTextField();
t7=new JTextField();
t8=new JTextField();
t9=new JTextField();

Upd=new JButton("Deliver Order");


View=new JButton("View Order");
Ext=new JButton("Exit Form");
Clear=new JButton("Clear Details");

Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));


View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));

l1=new JLabel("Sales Order No:");


l2=new JLabel("Customer Name:");
l3=new JLabel("Order Description:");
l4=new JLabel("Order Date:");
l5=new JLabel("Delivery Date:");
l6=new JLabel("Design No:");
l7=new JLabel("Advance Paid Rs:");
l8=new JLabel("Total Amount Rs:");
l9=new JLabel("Balance Amount Rs:");
l1.setForeground(Color.WHITE);
l2.setForeground(Color.WHITE);
l3.setForeground(Color.WHITE);
l4.setForeground(Color.WHITE);
l5.setForeground(Color.WHITE);
l6.setForeground(Color.WHITE);
l7.setForeground(Color.WHITE);
l8.setForeground(Color.WHITE);
100
l9.setForeground(Color.WHITE);

l1.setFont(new Font("Script MT Bold",Font.BOLD,20));


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l8.setFont(new Font("Script MT Bold",Font.BOLD,20));
l9.setFont(new Font("Script MT Bold",Font.BOLD,20));
t1.setFont(new Font("MT Bold",Font.BOLD,20));
t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
t6.setFont(new Font("MT Bold",Font.BOLD,20));
t7.setFont(new Font("MT Bold",Font.BOLD,20));
t8.setFont(new Font("MT Bold",Font.BOLD,20));
t9.setFont(new Font("MT Bold",Font.BOLD,20));
c1.setLayout(null);
c1.add(lo);
lo.add(l);
lo.add(ll);

l1.setBounds(450,180,200,30);
t1.setBounds(650,180,100,30);

l2.setBounds(450,240,200,30);
t2.setBounds(650,240,200,30);

l3.setBounds(450,300,200,30);
t3.setBounds(650,300,300,30);

l4.setBounds(450,360,200,30);
t4.setBounds(650,360,150,30);

l5.setBounds(450,420,200,30);
t5.setBounds(650,420,150,30);

l6.setBounds(450,480,200,30);
t6.setBounds(650,480,100,30);

l7.setBounds(450,540,200,30);
t7.setBounds(650,540,100,30);

l8.setBounds(450,600,200,30);
t8.setBounds(650,600,100,30);
l9.setBounds(450,660,200,30);
t9.setBounds(650,660,100,30);

101
Upd.setBounds(1050,200,160,40);
Clear.setBounds(1050,300,160,40);
View.setBounds(1050,400,160,40);
Ext.setBounds(1050,500,160,40);

Upd.addActionListener(this);
Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);

lo.add(l1);
lo.add(t1);
lo.add(l2);
lo.add(t2);
lo.add(l3);
lo.add(t3);
lo.add(l4);
lo.add(t4);
lo.add(l5);
lo.add(t5);
lo.add(l6);
lo.add(t6);
lo.add(l7);
lo.add(t7);
lo.add(l8);
lo.add(t8);
lo.add(l9);
lo.add(t9);

lo.add(Upd);
lo.add(Clear);
lo.add(View);
lo.add(Ext);
setVisible(true);
}

public void cleartext()


{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);
t7.setText(null);
t8.setText(null);
}

public void actionPerformed(ActionEvent a1)


102
{
con();
try{
if(a1.getSource()==Upd)
{
st.executeUpdate("update orders set completed=1 where ord_id="+t1.getText());

JOptionPane.showMessageDialog(this,"Sales Order Deleivered");


}
else
if(a1.getSource()==View)
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter Sales Order No:");
else
{
rs=st.executeQuery("select * from orders where ord_id="+t1.getText());
if(rs.next())
{
t3.setText(rs.getString("orderdesc"));
t4.setText(rs.getString("ord_date"));
t5.setText(rs.getString("del_date"));
t6.setText(rs.getString("design_no"));
t7.setText(rs.getString("advance"));
t8.setText(rs.getString("totalamt"));
t9.setText(Integer.toString(Integer.parseInt(t8.getText())-Integer.parseInt(t7.getText())));
int cid=rs.getInt("cust_id");
rs1=st.executeQuery("select * from Customer where cust_id="+cid);
rs1.next();
t2.setText(rs1.getString("cust_name"));
}
else
JOptionPane.showMessageDialog(this,"No such Sales Order Number Exists");
}
}
else
if(a1.getSource()==Clear)
{

cleartext();
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
}

103
JEWELLERY SERVICE ORDER DELIVERY FORM: ServiceDeliveryForm.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;

public class ServiceDeliveryForm extends JFrame implements ActionListener


{

JTextField t1,t2,t3,t4,t5,t6,t7,t8;

ImageIcon img;
JLabel lo,ll,l,l0,l1,l2,l3,l4,l5,l6,l7,l8;
JButton New,Upd,View,Clear,Ext,Del;
JComboBox cust;
Connection cn1;
ResultSet rs,rs1;
Statement st;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");

cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel?user=root&amp;password=");

st=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs1=st.executeQuery("select * from Customer");
rs=st.executeQuery("select * from service");

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public ServiceDeliveryForm()
{
super("Service Entry Form");
Container c1=getContentPane();
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

setBackground( Color.LIGHT_GRAY);
setForeground(new Color(0,150,0));
setSize( scrw , scrh );

setLocation( 0 , 0 );

104
img=new ImageIcon("background.jpg");

l = new JLabel("TARA JEWELLARS ");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));

ll = new JLabel("SERVICE ORDER DELIVERY SCREEN");


ll.setFont(new Font("Garamond",Font.BOLD,30));
ll.setForeground( new Color(212,175,55));

lo = new JLabel(img);
lo.setBounds(0,0,scrw,scrh);

l.setBounds(320,10,1000,100) ;
ll.setBounds(500,100,1000,50) ;

t1=new JTextField();
t2=new JTextField();
t3=new JTextField();
t4=new JTextField();
t5=new JTextField();
t6=new JTextField();
t7=new JTextField();
t8=new JTextField();
Upd=new JButton("Deliver");
View=new JButton("View");
Ext=new JButton("Exit");
Clear=new JButton("Clear");

Upd.setFont(new Font("Script MT Bold",Font.BOLD,20));


View.setFont(new Font("Script MT Bold",Font.BOLD,20));
Ext.setFont(new Font("Script MT Bold",Font.BOLD,20));
Clear.setFont(new Font("Script MT Bold",Font.BOLD,20));

l1=new JLabel("Service Order No:");


l2=new JLabel("Customer Name:");
l3=new JLabel("Service Description:");
l4=new JLabel("Service Order Date:");
l5=new JLabel("Service Delivery Date:");
l6=new JLabel("Total Amount Rs:");
l7=new JLabel("Advance Paid Rs:");
l8=new JLabel("Balance Amount Rs:");

l1.setFont(new Font("Script MT Bold",Font.BOLD,20));


l2.setFont(new Font("Script MT Bold",Font.BOLD,20));
l3.setFont(new Font("Script MT Bold",Font.BOLD,20));
l4.setFont(new Font("Script MT Bold",Font.BOLD,20));
l5.setFont(new Font("Script MT Bold",Font.BOLD,20));
105
l6.setFont(new Font("Script MT Bold",Font.BOLD,20));
l7.setFont(new Font("Script MT Bold",Font.BOLD,20));
l8.setFont(new Font("Script MT Bold",Font.BOLD,20));
t1.setFont(new Font("MT Bold",Font.BOLD,20));
t2.setFont(new Font("MT Bold",Font.BOLD,20));
t3.setFont(new Font("MT Bold",Font.BOLD,20));
t4.setFont(new Font("MT Bold",Font.BOLD,20));
t5.setFont(new Font("MT Bold",Font.BOLD,20));
t6.setFont(new Font("MT Bold",Font.BOLD,20));
t7.setFont(new Font("MT Bold",Font.BOLD,20));
t8.setFont(new Font("MT Bold",Font.BOLD,20));
l1.setForeground(Color.WHITE);
l2.setForeground(Color.WHITE);
l3.setForeground(Color.WHITE);
l4.setForeground(Color.WHITE);
l5.setForeground(Color.WHITE);
l6.setForeground(Color.WHITE);
l7.setForeground(Color.WHITE);
l8.setForeground(Color.WHITE);

c1.setLayout(null);
c1.add(lo);
lo.add(l);
lo.add(ll);

l1.setBounds(450,200,200,30);
t1.setBounds(650,200,100,30);

l2.setBounds(450,260,200,30);
t2.setBounds(650,260,150,30);

l3.setBounds(450,320,200,30);
t3.setBounds(650,320,300,30);

l4.setBounds(450,380,200,30);
t4.setBounds(650,380,150,30);

l5.setBounds(450,440,200,30);
t5.setBounds(650,440,150,30);

l6.setBounds(450,500,200,30);
t6.setBounds(650,500,100,30);

l7.setBounds(450,560,200,30);
t7.setBounds(650,560,100,30);

l8.setBounds(450,620,200,30);
t8.setBounds(650,620,100,30);

Upd.setBounds(1000,260,100,40);
Clear.setBounds(1000,380,100,40);
106
View.setBounds(1000,500,100,40);
Ext.setBounds(1000,620,100,40);

Upd.addActionListener(this);
Clear.addActionListener(this);
View.addActionListener(this);
Ext.addActionListener(this);

lo.add(l1);
lo.add(t1);

lo.add(l2);
lo.add(t2);

lo.add(l3);
lo.add(t3);
lo.add(l4);
lo.add(t4);

lo.add(l5);
lo.add(t5);

lo.add(l6);
lo.add(t6);

lo.add(l7);
lo.add(t7);
lo.add(l8);
lo.add(t8);

lo.add(Upd);
lo.add(Clear);
lo.add(View);
lo.add(Ext);
setVisible(true);
}

public void cleartext()


{
t1.setText(null);
t2.setText(null);
t3.setText(null);
t4.setText(null);
t5.setText(null);
t6.setText(null);
t7.setText(null);
t8.setText(null);
}

public void actionPerformed(ActionEvent a1)


{
107
con();

try{
if(a1.getSource()==Upd)
{
st.executeUpdate("update service set completed=1 where service_id="+t1.getText());
JOptionPane.showMessageDialog(this,"Service Order Delivered");
}
else
if(a1.getSource()==View)
{
if(t1.getText().equals(""))
JOptionPane.showMessageDialog(this,"Enter service No:");
else
{
rs=st.executeQuery("select * from service where service_id="+t1.getText());
if(rs.next())
{
t3.setText(rs.getString("service_desc"));
t4.setText(rs.getString("service_dt"));
t5.setText(rs.getString("delivery_dt"));
t6.setText(rs.getString("totalamt"));
t7.setText(rs.getString("advance"));
t8.setText(Integer.toString(Integer.parseInt(t6.getText())-Integer.parseInt(t7.getText())));

int cid=rs.getInt("cust_id");
rs1=st.executeQuery("select * from Customer where cust_id="+cid);
rs1.next();
t2.setText(rs1.getString("cust_name"));
}
else
JOptionPane.showMessageDialog(this,"No such Service Order Number Exists");
}
}
else
if(a1.getSource()==Clear)
{

cleartext();
}
else
if(a1.getSource()==Ext)
{
rs.close();
this.setVisible(false);
}
}catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}
public void itemStateChanged(ItemEvent i)
{}
}
108
VIEW CUSTOMERS: CustomerReport.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import javax.swing.table.*;

public class CustomerReport extends JFrame implements ActionListener


{
JButton View,Print,Close;
JTextField t1;
JTable tab;
JScrollPane jsp;
Connection cn1;
Statement st1;
ResultSet rs;
DefaultTableModel dtm;
JLabel lbl1,lbl2,lbl4,l;
String addr;
int cno;
ImageIcon ii;
CustomerReport()
{
super("List of Customer");
Container c= getContentPane();
c.setLayout(null);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width
c.setSize( scrw, scrh);

ii=new ImageIcon("background.jpg");
lbl1 = new JLabel(ii);
lbl1.setBounds(0,0,scrw,scrh);
c.add(lbl1);

l = new JLabel("TARA JEWELLARS ");


l.setBounds(320,20,800,50) ;
l.setFont(new Font("Garamond",Font.BOLD,30));
l.setForeground( new Color(212,175,55));
lbl1.add(l);

lbl2 = new JLabel("LIST OF CUSTOMERS");


lbl2.setBounds(500,100,600,50);
lbl2.setForeground( new Color(150,0,0));
lbl2.setFont(new Font("Garamond",Font.BOLD,30));

109
lbl1.add(lbl2);

JLabel lbl3 = new JLabel("TOTAL Number of Customers : ");


lbl3.setBounds(500,600,350,50);
lbl3.setForeground( new Color(150,0,0));
lbl3.setFont(new Font("MT Bold",Font.BOLD,20));

lbl4 = new JLabel();


lbl4.setBounds(1000,600,200,50);
lbl4.setForeground( new Color(150,0,0));
lbl4.setFont(new Font("MT Bold",Font.BOLD,20));

View=new JButton("View Report");


View.setForeground( new Color(150,0,0));
View.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(View);
View.setBounds(1090,50,200,30);
View.addActionListener(this);

Print=new JButton("Print Report");


Print.setFont(new Font("MT Bold",Font.BOLD,20));
Print.setForeground( new Color(150,0,0));
lbl1.add(Print);
Print.setBounds(1090,100,200,30);
Print.addActionListener(this);

Close=new JButton("Close Report");


Close.setFont(new Font("MT Bold",Font.BOLD,20));
Close.setForeground( new Color(150,0,0));
lbl1.add(Close);
Close.setBounds(1090,150,200,30);
Close.addActionListener(this);

dtm = new DefaultTableModel();


dtm.addColumn("CUSTOMER NO");
dtm.addColumn("CUSTOMER NAME");
dtm.addColumn("ADDRESS");
dtm.addColumn("MOBILE NO");
dtm.addColumn("RESIDENCE NO");
dtm.addColumn("EMAIL-ID");

tab = new JTable(dtm);

int v= ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
jsp = new JScrollPane(tab,v,h);
jsp.setFont(new Font("Monotype Corsiva",Font.BOLD,20));
jsp.setBounds(450,200,scrw-500,scrh-400);

110
lbl1.add(l);
lbl1.add(jsp);
lbl1.add(lbl3);
lbl1.add(lbl4);
setVisible(true);
setSize(scrw,scrh);
}

public void actionPerformed(ActionEvent a)


{
int tot=0;
String str;
if(a.getSource()==View)
{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st1=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=st1.executeQuery("select * from customer");
while(rs.next())
{
Object[] data=new Object[8];
data[0]=rs.getString(1);
data[1]=rs.getString(2);
data[2]=rs.getString(3);
data[3]=rs.getString(4);
data[4]=rs.getString(5);
data[5]=rs.getString(6);
dtm.addRow(data);
tot++;
}
lbl4.setText(Integer.toString(tot));
}//try
catch(Exception e)
{
System.out.println("SQL Error : "+e.getMessage());
System.exit(0);
}
}//if
else if(a.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else if(a.getSource()==Close)
this.setVisible(false);
}
}
111
VIEW JEWELLERY FOR SALE: ItemReport.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import javax.swing.table.*;

public class ItemReport extends JFrame implements ActionListener


{
JButton View,Print,Close;
JTextField t1;
JTable tab;
JScrollPane jsp;
Connection cn1;
Statement st1;
ResultSet rs;
DefaultTableModel dtm;
JLabel lbl1,lbl2,lbl4,l;
String addr;
int cno;
ImageIcon ii;
ItemReport()
{
super("List of Jewellary For Sale");
Container c= getContentPane();
c.setLayout(null);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

c.setSize( scrw, scrh);


//c.setLocation( 0 , 0 );

ii=new ImageIcon("background.jpg");
lbl1 = new JLabel(ii);
lbl1.setBounds(0,0,scrw,scrh);
c.add(lbl1);

l = new JLabel("TARA JEWELLARS ");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));
l.setBounds(320,20,800,50) ;
lbl1.add(l);

lbl2 = new JLabel("LIST OF JEWELLARY AVAILABLE FOR SALE");


lbl2.setBounds(400,120,800,20);
lbl2.setForeground( new Color(150,0,150));
112
lbl2.setFont(new Font("Garamond",Font.BOLD,30));
lbl1.add(lbl2);

JLabel lbl3 = new JLabel("TOTAL JWELLARY FOR SALE : ");


lbl3.setBounds(580,600,350,50);
lbl3.setForeground( new Color(150,0,150));
lbl3.setFont(new Font("MT Bold",Font.BOLD,20));

lbl4 = new JLabel();


lbl4.setBounds(1000,600,100,50);
lbl4.setForeground( new Color(150,0,150));
lbl4.setFont(new Font("MT Bold",Font.BOLD,20));

View=new JButton("View Report");


View.setForeground( new Color(150,0,150));
View.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(View);
View.setBounds(1090,50,200,30);
View.addActionListener(this);

Print=new JButton("Print Report");


Print.setFont(new Font("MT Bold",Font.BOLD,20));
Print.setForeground( new Color(150,0,150));
lbl1.add(Print);
Print.setBounds(1090,100,200,30);
Print.addActionListener(this);

Close=new JButton("Close Report");


Close.setFont(new Font("MT Bold",Font.BOLD,20));
Close.setForeground( new Color(150,0,150));
lbl1.add(Close);
Close.setBounds(1090,150,200,30);
Close.addActionListener(this);

dtm = new DefaultTableModel();


dtm.addColumn("PRODUCT ID");
dtm.addColumn("PRODUCT");
dtm.addColumn("TYPE");
dtm.addColumn("WEIGHT");
dtm.addColumn("PRICE");

tab = new JTable(dtm);


int v= ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
jsp = new JScrollPane(tab,v,h);
jsp.setFont(new Font("MT Bold",Font.BOLD,20));
jsp.setBounds(450,200,scrw-500,scrh-400);
c.setBounds(0,0,scrw,scrh);
c.setLayout(null);
lbl1.add(jsp);
lbl1.add(lbl3);
113
lbl1.add(lbl4);
setBackground(Color.white);
setVisible(true);
setSize(scrw,scrh);
}

public void actionPerformed(ActionEvent a)


{
int tot=0;
String str;
if(a.getSource()==View)
{
try
{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st1=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);

rs=st1.executeQuery("select product.*,type from product,prod_type where sold=0 and


product.type_id=prod_type.type_id");

while(rs.next())
{
Object[] data=new Object[5];
data[0]=rs.getInt(1);
data[1]=rs.getString(3);
data[2]=rs.getString(8);
data[3]=rs.getInt(4);
data[4]=rs.getInt(6);
dtm.addRow(data);
tot++;
}
lbl4.setText(Integer.toString(tot));
}//try
catch(Exception e)
{
System.out.println("SQL Error : "+e.getMessage());
System.exit(0);
}
}//if
else if(a.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else if(a.getSource()==Close)
this.setVisible(false);
}
}
114
VIEW PENDING SERVICE ORDER: PendingServiceOrderReport.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.awt.print.*;
import javax.swing.table.*;

public class PendingServiceOrderReport extends JFrame implements ActionListener


{
JButton View,Print,Close;
JTextField t1;
JTable tab;

JScrollPane jsp;
Connection cn1;
Statement st1;
ResultSet rs,rs1;
DefaultTableModel dtm;
JLabel l,lbl1,lbl2,lbl3,lbl4,lbl5,lbl6;
ImageIcon ii;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");

cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel?user=root&amp;password=");

st1=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE)
;

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}

PendingServiceOrderReport()
{
super("Pending Service Orders Report");
Container c= getContentPane();
c.setLayout(null);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;
115
c.setSize( scrw, scrh);
//c.setLocation( 0 , 0 );

ii=new ImageIcon("background.jpg");
lbl1 = new JLabel(ii);
lbl1.setBounds(0,0,scrw,scrh);
c.add(lbl1);
l = new JLabel("TARA JEWELLARS ");
l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));
l.setBounds(320,20,800,50) ;
lbl1.add(l);

lbl2 = new JLabel("LIST OF PENDING SERVICE ORDERS");


lbl2.setBounds(450,120,600,30);
lbl2.setForeground( new Color(128,0,128));
lbl2.setFont(new Font("MT Bold",Font.BOLD,30));
lbl1.add(lbl2);

View=new JButton("View Report");


View.setForeground( new Color(128,0,128));
View.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(View);
View.setBounds(1090,50,200,30);
View.addActionListener(this);

Print=new JButton("Print Report");


Print.setFont(new Font("MT Bold",Font.BOLD,20));
Print.setForeground( new Color(128,0,128));
lbl1.add(Print);
Print.setBounds(1090,100,200,30);
Print.addActionListener(this);

Close=new JButton("Close Report");


Close.setFont(new Font("MT Bold",Font.BOLD,20));
Close.setForeground( new Color(128,0,128));
lbl1.add(Close);
Close.setBounds(1090,150,200,30);
Close.addActionListener(this);

lbl3 = new JLabel("TOTAL SERVICE ORDERS PENDING : ");


lbl3.setBounds(600,550,400,50);
lbl3.setForeground( new Color(128,0,128));
lbl3.setFont(new Font("MT Bold",Font.BOLD,20));

lbl4 = new JLabel();


lbl4.setBounds(1000,550,100,50);
lbl4.setForeground( new Color(128,0,128));
116
lbl4.setFont(new Font("",Font.BOLD,20));

lbl5= new JLabel("TOTAL AMOUNT PENDING : ");


lbl5.setBounds(700,600,400,50);
lbl5.setForeground( new Color(128,0,128));
lbl5.setFont(new Font("MT Bold",Font.BOLD,20));

lbl6 = new JLabel();


lbl6.setBounds(1000,600,100,50);
lbl6.setForeground( new Color(128,0,128));
lbl6.setFont(new Font("MT Bold",Font.BOLD,20));

dtm = new DefaultTableModel();


dtm.addColumn("SERVICE ID");
dtm.addColumn("SERVICE DESCRIPTION");
dtm.addColumn("SERVICE ORDER DATE");
dtm.addColumn("SERVICE DELIVERY DATE");
dtm.addColumn("CUSTOMER NAME");

tab = new JTable(dtm);

int v= ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
jsp = new JScrollPane(tab,v,h);
jsp.setFont(new Font("MT Bold",Font.BOLD,20));
jsp.setBounds(450,200,scrw-500,scrh-400);
lbl1.setBounds(0,0,scrw,scrh);
lbl1.setLayout(null);
lbl1.add(jsp);

lbl1.add(lbl3);
lbl1.add(lbl4);
lbl1.add(lbl5);
lbl1.add(lbl6);

setVisible(true);
setSize(scrw,scrh);

public void actionPerformed(ActionEvent a)


{

if(a.getSource()==View)
117
{

try
{
con();

int tot=0,bamt=0;
String str="select service.*,cust_name from service,customer where service.cust_id=customer.cust_id
and completed=0";
rs=st1.executeQuery(str);
Object[] data=new Object[5];
while(rs.next())
{
data[0]=rs.getInt(1);
data[1]=rs.getString(2);
data[2]=rs.getString(3);
data[3]=rs.getString(4);
data[4]=rs.getString(9);

dtm.addRow(data);
tot++;
}
str="select * from service where completed=0";
rs=st1.executeQuery(str);
while(rs.next())
bamt=bamt+(rs.getInt(6)-rs.getInt(5));

rs.close();
lbl4.setText(Integer.toString(tot));
lbl6.setText(Integer.toString(bamt));
}//try
catch(Exception e)
{
System.out.println("SQL Errors"+e.getMessage());
System.exit(0);
}

}//if

else if(a.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else if(a.getSource()==Close)
this.setVisible(false);
}
}
118
VIEW PENDING SALES ORDER: PendingOrderReport.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.awt.print.*;
import javax.swing.table.*;

public class PendingOrderReport extends JFrame implements ActionListener


{
JButton View,Print,Close;
JTextField t1;
JTable tab;

JScrollPane jsp;
Connection cn1;
Statement st1;
ResultSet rs,rs1;
DefaultTableModel dtm;
JLabel l,lbl1,lbl2,lbl3,lbl4,lbl5,lbl6;
ImageIcon ii;

public void con()


{
try{
Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");
st1=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}

PendingOrderReport()
{
super("Pending Sales Orders Report");
Container c= getContentPane();
c.setLayout(null);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;

c.setSize( scrw, scrh);


//c.setLocation( 0 , 0 );

ii=new ImageIcon("background.jpg");
lbl1 = new JLabel(ii);
119
lbl1.setBounds(0,0,scrw,scrh);
c.add(lbl1);

l = new JLabel("TARA JEWELLARS ");


l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));
l.setBounds(320,20,800,50) ;
lbl1.add(l);

lbl2 = new JLabel("LIST OF PENDING SALES ORDERS");


lbl2.setBounds(450,120,800,20);
lbl2.setForeground( new Color(128,128,255));
lbl2.setFont(new Font("Garamond",Font.BOLD,30));
lbl1.add(lbl2);

View=new JButton("View Report");


//View.setForeground( new Color(128,128,255));
View.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(View);
View.setBounds(1090,50,200,30);
View.addActionListener(this);

Print=new JButton("Print Report");


Print.setFont(new Font("MT Bold",Font.BOLD,20));
//Print.setForeground( new Color(128,128,255));
lbl1.add(Print);
Print.setBounds(1090,100,200,30);
Print.addActionListener(this);

Close=new JButton("Close Report");


Close.setFont(new Font("MT Bold",Font.BOLD,20));
//Close.setForeground( new Color(128,128,255));
lbl1.add(Close);
Close.setBounds(1090,150,200,30);
Close.addActionListener(this);
lbl5 = new JLabel();
lbl5.setBounds(900,600,100,30);
lbl5.setForeground( new Color(128,128,255));
lbl5.setFont(new Font("MT Bold",Font.BOLD,20));

lbl6 = new JLabel();


lbl6.setBounds(900,650,150,30);
lbl6.setForeground( new Color(128,128,255));
lbl6.setFont(new Font("MT Bold",Font.BOLD,20));

lbl3 = new JLabel("TOTAL ORDERS PENDING : ");


lbl3.setBounds(550,600,400,30);
120
lbl3.setForeground( new Color(128,128,255));
lbl3.setFont(new Font("MT Bold",Font.BOLD,20));

lbl4 = new JLabel("TOTAL AMOUNT PENDING : ");


lbl4.setBounds(550,650,400,30);
lbl4.setForeground( new Color(128,128,255));
lbl4.setFont(new Font("MT Bold",Font.BOLD,20));

dtm = new DefaultTableModel();


dtm.addColumn("ORDER NO");
dtm.addColumn("ORDER DESCRIPTION");
dtm.addColumn("ORDER DATE");
dtm.addColumn("DELIVERY DATE");
dtm.addColumn("CUSTOMER NAME");
dtm.addColumn("ORDER AMOUNT");

tab = new JTable(dtm);

int v= ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
jsp = new JScrollPane(tab,v,h);
jsp.setFont(new Font("MT Bold",Font.BOLD,20));
jsp.setBounds(450,200,scrw-500,scrh-400);
lbl1.setBounds(0,0,scrw,scrh);
lbl1.setLayout(null);
lbl1.add(jsp);
lbl1.add(lbl3);
lbl1.add(lbl4);
lbl1.add(lbl5);
lbl1.add(lbl6);

setBackground(Color.BLACK);
setVisible(true);
setSize(scrw,scrh);

public void actionPerformed(ActionEvent a)


{

if(a.getSource()==View)
{

try
{
121
con();

int tot=0,bamt=0;
String str="select ord_id,orderdesc,ord_date,del_date,cust_name,totalamt,advance from orders,customer
where orders.cust_id=customer.cust_id and completed=0";
rs=st1.executeQuery(str);
Object[] data=new Object[6];
while(rs.next())
{
data[0]=rs.getInt(1);
data[1]=rs.getString(2);
data[2]=rs.getString(3);
data[3]=rs.getString(4);
data[4]=rs.getString(5);
data[5]=rs.getInt(6)-rs.getInt(7);

dtm.addRow(data);
tot++;
}
str="select * from orders where completed=0";
rs=st1.executeQuery(str);
while(rs.next())
bamt=bamt+(rs.getInt(8)-rs.getInt(7));

rs.close();
lbl5.setText(Integer.toString(tot));
lbl6.setText(Integer.toString(bamt));
}//try
catch(Exception e)
{
System.out.println("SQL Errors"+e.getMessage());
System.exit(0);
}

}//if

else if(a.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else if(a.getSource()==Close)
this.setVisible(false);

}
}

122
VIEW SALES BILL: SaleBillReport.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.awt.print.*;
import javax.swing.table.*;

public class SaleBillReport extends JFrame implements ActionListener


{
JButton View,Print,Close;
JTextField t1;
JTable tab;
JComboBox cust;
JScrollPane jsp;
Connection cn1;
Statement st1;
ResultSet rs,rs1;
DefaultTableModel dtm;
JLabel l,lbl0,lbl1,lbl2,lbl3,lbl4,lbl5,lbl6;
ImageIcon ii;

public void con()


{
try{

Class.forName("com.mysql.jdbc.Driver");
cn1=DriverManager.getConnection("jdbc:mysql://localhost:3306/jewel","root","");

st1=cn1.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE)
;

}catch(ClassNotFoundException e){JOptionPane.showMessageDialog(this,e);}
catch(SQLException s){JOptionPane.showMessageDialog(this,s);}
}

SaleBillReport()
{
super("Sales Bills Report");
Container c= getContentPane();
c.setLayout(null);

Toolkit kit = Toolkit.getDefaultToolkit();


Dimension screens = kit.getScreenSize();
int scrh = screens.height;
int scrw = screens.width;
con();
c.setSize( scrw, scrh);
123
//c.setLocation( 0 , 0 );
try{
cust=new JComboBox();
rs1=st1.executeQuery("select * from customer");
while(rs1.next())
{
cust.addItem(rs1.getString("cust_name"));
}
}catch(SQLException s){ }

ii=new ImageIcon("background.jpg");
lbl1 = new JLabel(ii);
lbl1.setBounds(0,0,scrw,scrh);
c.add(lbl1);
l = new JLabel("TARA JEWELLARS ");
l.setFont(new Font("Garamond",Font.BOLD,40));
l.setForeground( new Color(212,175,55));
l.setBounds(320,20,800,50) ;
lbl1.add(l);

lbl2 = new JLabel("SALES BILL REPORT");


lbl2.setBounds(450,100,600,30);
lbl2.setForeground( new Color(212,175,55));
lbl2.setFont(new Font("MT Bold",Font.BOLD,30));
lbl1.add(lbl2);

View=new JButton("View Report");

View.setFont(new Font("MT Bold",Font.BOLD,20));


lbl1.add(View);
View.setBounds(1090,50,200,30);
View.addActionListener(this);

Print=new JButton("Print Report");


Print.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(Print);
Print.setBounds(1090,100,200,30);
Print.addActionListener(this);

Close=new JButton("Close Report");


Close.setFont(new Font("MT Bold",Font.BOLD,20));

lbl1.add(Close);
Close.setBounds(1090,150,200,30);
Close.addActionListener(this);

lbl0 = new JLabel("SELECT CUSTOMER : ");


lbl0.setBounds(450,150,250,30);
lbl0.setForeground( new Color(212,175,55));
lbl0.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(lbl0);
124
cust.setBounds(700,150,200,30);
//cust.setForeground( new Color(0,0,255));
cust.setFont(new Font("MT Bold",Font.BOLD,20));
lbl1.add(cust);
cust.addActionListener(this);

lbl3 = new JLabel("TOTAL BILLS : ");


lbl3.setBounds(600,580,300,30);
lbl3.setForeground( new Color(212,175,55));
lbl3.setFont(new Font("MT Bold",Font.BOLD,20));

lbl4 = new JLabel();


lbl4.setBounds(1050,580,100,30);
lbl4.setForeground( new Color(212,175,55));
lbl4.setFont(new Font("MT Bold",Font.BOLD,20));

lbl5= new JLabel("TOTAL AMOUNT COLLECTED : ");


lbl5.setBounds(600,620,400,30);
lbl5.setForeground( new Color(212,175,55));
lbl5.setFont(new Font("MT Bold",Font.BOLD,20));

lbl6 = new JLabel();


lbl6.setBounds(1050,620,100,30);
lbl6.setForeground( new Color(212,175,55));
lbl6.setFont(new Font("MT Bold",Font.BOLD,20));

dtm = new DefaultTableModel();


dtm.addColumn("BILL NO");
dtm.addColumn("BILL DATE");
dtm.addColumn("CUSTOMER NAME");
dtm.addColumn("BILL AMOUNT");

tab = new JTable(dtm);


int v= ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h= ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
jsp = new JScrollPane(tab,v,h);
jsp.setFont(new Font("MT Bold",Font.BOLD,20));
jsp.setBounds(450,200,scrw-500,scrh-400);
lbl1.setBounds(0,0,scrw,scrh);
lbl1.setLayout(null);
lbl1.add(jsp);

lbl1.add(lbl3);
lbl1.add(lbl4);
lbl1.add(lbl5);
lbl1.add(lbl6);

setBackground(Color.white);
setVisible(true);
setSize(scrw,scrh);
125
}
public void actionPerformed(ActionEvent a)
{
if(a.getSource()==View)
{
try
{
con();
int tot=0,bamt=0;
String str="select bill.*,cust_name from bill,customer where bill.cust_id=customer.cust_id and
cust_name='"+(String)cust.getSelectedItem()+"'";
rs=st1.executeQuery(str);
Object[] data=new Object[5];
while(rs.next())
{
data[0]=rs.getString(1);
data[1]=rs.getString(3);
data[2]=rs.getString(5);
data[3]=rs.getInt(4);

dtm.addRow(data);
tot++;
}
str="select bill.*,cust_name from bill,customer where bill.cust_id=customer.cust_id and
cust_name='"+(String)cust.getSelectedItem()+"'";
rs=st1.executeQuery(str);
while(rs.next())
bamt=bamt+rs.getInt(4);
rs.close();
lbl4.setText(Integer.toString(tot));
lbl6.setText(Integer.toString(bamt));
}//try
catch(Exception e)
{
System.out.println("SQL Errors"+e.getMessage());
System.exit(0);
}
}//if
else if(a.getSource()==Print)
{
PrintJob printjob = getToolkit().getPrintJob(this, "Print graphics", null);
Graphics g = printjob.getGraphics();
g.drawRect(120,20,350,30);
printjob.end();
}
else if(a.getSource()==Close)
this.setVisible(false);
}
}

126
LIMITATION AND FUTURE ENHANCEMENT

 This system is developed such a way that additional enhancement can be done without much difficulty.
 The renovation of the project would increase the flexibility of the system.
 Also the features are provided in such a way that the system can also be made better and efficient
functionality.
 The programs were coded in an easier and more structured manner so that may further modifications
may be incorporated easily.
 The processing time in this system is very lesser compared to existing system.
 This system has good flexibility of accommodating any more changes that might arise in the future also.
 In this system, data integrity is maintained and data redundancy is avoided and it increase system
efficiency.
 The database is designed in such a way that it will be also helpful for enhancement of the system.

127
BIBLIOGRAPHY

 Java 2 programming black books, Steven Horlzner


 http://www.tutorialspoint.com/

128

Вам также может понравиться