Report of Online Medical Store
Report of Online Medical Store
Abstract:
The purpose of online medical store is to automate the existing manual
system by the help of computerized equipments and full-fleged compute
software, fulfilling their requirements, so that their valuable data/information
can be stored for a longer period with easy accessing and manipulation of
the same. The required software and hardware are easily available and easy
to work with.
Online Medical Store, as described above, can lead to error free, secure,
reliable and fast management system. It can assist the user to concentrate on
their other activities rather to concentrate on the recors keeping. Thus it will
help organization inbetter utilization of resources. The organization can
maintain computerzed records without redundant entires. That means that
oneneed not be distracted by information that is not relevant, while being able
to reach the information.
The aim is to automate its existing manual system by the help of
computerized equipments and full-fi=leged computer software, fulfilling their
requirements, so that their valuable data/information can be stored for a
longer period with easy accessing and manipulation and better services for
the clients.
Introduction:
The “Online Medical Store” has been developed to override the problems
prevailing in the practicing manual system. This software is supported to
eliminate and in some cases reduce the hardships faced by this existing
system. Moreover the system is designed for the particular need of the
company to carry out operations in a smooth and effective manner.
The application is reduced as much a possible to avoid errors while
entering the data. It also provides error message while entering invalid data.
No formal knowledge is needed for the user to use this system. Thus by this
all it proves it is user-friendly. Online Medical store, as described above, can
lead to error free, secure, reliable and fast management system. It can assist
the user to concentrate on their other activities rather to concentrate on the
record keeping. Thus it will help organization in better utilization of
resources.
Every organization, whether big or small, has challenges to overcome
and managing the information of Medicine Company, Customer, Medicine
stock, Payment, Order. Every Online Medical Store has different customer
needs, therefore we design exclusive employee management systems that are
adapted to your managerial requirements, This is designed to assist in
strategic planning, and will help you ensure that your organization is
equipped with the right level of information and details for your future goals.
Also, for those busy executive who are always on the go, our systems come
with remote access features, which will allow you to manage your workforce
anytime, at all times. These systems wil allow you to better manage
resources.
Objectives:
Swing Packages
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.table.*;
//DataBase Packages
import java.net.*;
import java.io.*;
import java.sql.*;
//Main Class
//List of Labels
private JLabel lblOldMedicineID;
private JLabel lblMedicineID;
private JLabel lblMediTitle;
private JLabel lblQty;
private JLabel lblPrice;
//List of TextFields
//List of Buttons
//List of Panel
//Container
PMSSwing()
{ }
PMSSwing(int choice)
{
switch(choice)
{
case 1:
//Initial Window
//cotainer
cpane = getContentPane();
//components
btnEdit.addActionListener(this);
btnDelete.addActionListener(this);
btnRefresh.addActionListener(this);
btnExit.addActionListener(this);
btnpanel.add(btnAdd);
btnpanel.add(btnEdit);
btnpanel.add(btnDelete);
btnpanel.add(btnRefresh);
btnpanel.add(btnExit);
cpane.add(new JScrollPane(table));
cpane.add(btnpanel, BorderLayout.SOUTH);
break;
case 2:
//Appending Window
setTitle("Addition of data...");
setBounds(275, 275, 400, 200);
setResizable(false);
//cotainer
cpane = getContentPane();
cpane.setLayout(new FlowLayout());
//Components
btnSaveAdd.addActionListener(this);
btnCancel.addActionListener(this);
btnpanel.add(btnSaveAdd);
btnpanel.add(btnCancel);
cpane.add(panel);
cpane.add(btnpanel, BorderLayout.EAST);
break;
case 3:
//Editing window
setTitle("Updation of data...");
setBounds(350, 350, 400, 250);
setResizable(false);
//cotainer
cpane = getContentPane();
cpane.setLayout(new FlowLayout());
//Components
panel.add(lblOldMedicineID);
panel.add(txtOldMedicineID);
panel.add(lblMedicineID);
panel.add(txtMedicineID);
panel.add(lblMediTitle);
panel.add(txtMediTitle);
panel.add(lblQty);
panel.add(txtQty);
panel.add(lblPrice);
panel.add(txtPrice);
btnpanel = new JPanel(new GridLayout(2, 1, 10, 5));
btnSaveEdit = new JButton ("Save");
btnCancel = new JButton ("Cancel");
btnSaveEdit.addActionListener(this);
btnCancel.addActionListener(this);
btnpanel.add(btnSaveEdit);
btnpanel.add(btnCancel);
cpane.add(panel);
cpane.add(btnpanel, BorderLayout.EAST);
break;
case 4:
//Deleting window
setTitle("Removal of data...");
setBounds(300, 300, 300, 125);
setResizable(false);
//cotainer
cpane = getContentPane();
cpane.setLayout(new FlowLayout());
//Components
panel = new JPanel(new GridLayout(2, 1, 5, 0));
lblMedicineID = new JLabel("MedicineID to be
deleted: ");
txtMedicineID = new JTextField(15);
panel.add(lblMedicineID);
panel.add(txtMedicineID);
btnpanel.add(btnCancel);
cpane.add(panel);
cpane.add(btnpanel, BorderLayout.EAST);
break;
}
//Window Properties
setDefaultCloseOperation(HIDE_ON_CLOSE);
setVisible(true);
//conection to DataBase
ConnectToDatabase();
}
PreparedStatement ps = con.prepareStatement(qry);
ps.setString(1, code);
ps.setString(2, title);
ps.setString(3, hour);
ps.setString(4,price);
ps.executeUpdate();
}
catch(Exception e) {System.out.println(e + "\t" +
e.getMessage()); }
}
private void EditData (String code, String title, String hour, String
price, String cond)
{
try
{
//prepare statement
String qry = "Update MediInfo set MedicineID = ?,
MediTitle = ?, Qty = ?, Price = ? where MedicineID = ?";
PreparedStatement ps = con.prepareStatement(qry);
ps.setString(1, code);
ps.setString(2, title);
ps.setString(3, hour);
ps.setString(4, price);
ps.setString(5, cond);
ps.executeUpdate();
}
catch(Exception e) {System.out.println(e); }
}
//execute query
ResultSet rs = st.executeQuery("Select * from MediInfo");
//get metadata
ResultSetMetaData md = rs.getMetaData();
int colcount = md.getColumnCount();