Sie sind auf Seite 1von 49

LOG IN CODES

/*
* To change this template, choose Tools |
Templates
* and open the template in the editor.
*/
package eosystem;
import java.awt.Color;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
/**
*
* @author arielespiritu
*/
public class LoginForm extends
javax.swing.JDialog {
/**
* Creates new form LoginForm
*/
public LoginForm() {
initComponents();
}
/**
* This method is called from within the
constructor to initialize the form.
* WARNING: Do NOT modify this code.
The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();

jPasswordField1 = new
javax.swing.JPasswordField();
jTextField2 = new
javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.Wind
owConstants.DISPOSE_ON_CLOSE);
setTitle("Login Form");
setModal(true);
setUndecorated(true);
addWindowListener(new
java.awt.event.WindowAdapter() {
public void
windowClosing(java.awt.event.WindowEve
nt evt) {
formWindowClosing(evt);
}
});
jPanel1.setBackground(new
java.awt.Color(0, 0, 0));
jPanel1.setBorder(javax.swing.BorderFactor
y.createBevelBorder(javax.swing.border.Bev
elBorder.RAISED, null, new
java.awt.Color(0, 0, 0), null, null));
jPanel1.setLayout(null);
jPanel3.setBackground(new
java.awt.Color(255, 255, 255));
jPanel3.setBorder(javax.swing.BorderFactor
y.createLineBorder(new java.awt.Color(0, 0,
0)));
jPanel3.setLayout(null);

jLabel3.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel3.setText("Password:");
jPanel3.add(jLabel3);
jLabel3.setBounds(20, 150, 90, 40);
jPasswordField1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jPasswordField1ActionPerformed(evt);
}
});
jPanel3.add(jPasswordField1);
jPasswordField1.setBounds(110, 150,
330, 40);
jTextField2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jTextField2ActionPerformed(evt);
}
});
jPanel3.add(jTextField2);
jTextField2.setBounds(110, 90, 330,
40);
jLabel2.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel2.setText("Username:");
jPanel3.add(jLabel2);
jLabel2.setBounds(20, 90, 90, 40);
jButton1.setText("Login");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton1ActionPerformed(evt);
}

});
jPanel3.add(jButton1);
jButton1.setBounds(240, 210, 100, 40);
jButton2.setText("Exit");
jButton2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton2ActionPerformed(evt);
}
});
jPanel3.add(jButton2);
jButton2.setBounds(340, 210, 100, 40);
jLabel1.setFont(new
java.awt.Font("Times New Roman", 1, 30));
// NOI18N
jLabel1.setHorizontalAlignment(javax.swin
g.SwingConstants.CENTER);
jLabel1.setText("Enterprise Operations
System");
jPanel3.add(jLabel1);
jLabel1.setBounds(10, 10, 440, 70);
jPanel1.add(jPanel3);
jPanel3.setBounds(10, 10, 460, 270);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane()
);
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
478, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)

.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
290, Short.MAX_VALUE)
);
setSize(new java.awt.Dimension(478,
290));
setLocationRelativeTo(null);
}// </editor-fold>

int
n=JOptionPane.showConfirmDialog(this,
"System is Offline do you want to
proceed?","",JOptionPane.OK_CANCEL_O
PTION);
if(n==JOptionPane.OK_OPTION)
{
MainFrame.isLoading=true;
config.inetConnection=false;

private void
jButton2ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
try {
System.exit(0);
config.con.close();
} catch (SQLException ex) {

this.dispose();
MainFrame.isLoading=false;
}else{
System.exit(1);
}
}else{
config.inetConnection=true;
this.dispose();

Logger.getLogger(MainFrame.class.getNam
e()).log(Level.SEVERE, null, ex);
}

}
}
private void
formWindowClosing(java.awt.event.Windo
wEvent evt) {
// TODO add your handling code here:
System.exit(1);
}
private void
jPasswordField1ActionPerformed(java.awt.e
vent.ActionEvent evt) {
// TODO add your handling code here:
}
private void
jButton1ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
if(MainFrame.testInet("http://www.google.c
om/")==false){

private void
jTextField2ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
}
/**
* @param args the command line
arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed"
desc=" Look and feel setting code (optional)
">
/* If Nimbus (introduced in Java SE 6)
is not available, stay with the default look
and feel.

* For details see


http://download.oracle.com/javase/tutorial/ui
swing/lookandfeel/plaf.html
*/
try {
for
(javax.swing.UIManager.LookAndFeelInfo
info :
javax.swing.UIManager.getInstalledLookAn
dFeels()) {
if
("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(inf
o.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(LoginFo
rm.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(LoginFo
rm.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(LoginFo
rm.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch
(javax.swing.UnsupportedLookAndFeelExc
eption ex) {
java.util.logging.Logger.getLogger(LoginFo
rm.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the dialog */
}

// Variables declaration - do not modify


private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel3;
private javax.swing.JPasswordField
jPasswordField1;
private javax.swing.JTextField
jTextField2;
// End of variables declaration
}

MAINFRAME CODES
package eosystem;
import
eosystem.inventory.InventoryDeployment;
import
eosystem.transportation.LoginVehicle;
import
eosystem.transportation.LogoutVehicle;
import
eosystem.transportation.ParkingOfVehicle;
import
eosystem.transportation.SettingsYard;
import
eosystem.warehouse.WarehouseFrame;
import
eosystem.transportation.TransportationMana
gement;
import
eosystem.warehouse.AddCriticalLevel;
import
eosystem.warehouse.AddInventoryMonitori
ng;
import
eosystem.warehouse.AddWarehouseFrame;
import eosystem.warehouse.CriticalLevel;
import
eosystem.transportation.GPSTracking;
import
eosystem.warehouse.AddBOProducts;
import
eosystem.warehouse.AddPurchaseRequest;
import eosystem.warehouse.BOProductList;
import eosystem.warehouse.FormsFrame;
import
eosystem.warehouse.InventoryDetails;
import eosystem.warehouse.JobOrders;
import
eosystem.warehouse.MonitoringInventory;
import eosystem.warehouse.ProductIn;
import
eosystem.warehouse.PurchaseRequest;
import eosystem.warehouse.ReportsFrame;

import
eosystem.warehouse.WarehouseFrame;
import eosystem.warehouse.WarehouseList;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage;
import java.beans.PropertyVetoException;
import java.io.File;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.URL;
import java.net.URLConnection;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PiePlot;
import org.jfree.chart.plot.PlotOrientation;
import
org.jfree.data.category.CategoryDataset;
import
org.jfree.data.category.DefaultCategoryData
set;
import
org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.ui.RectangleInsets;
import org.jfree.util.Rotation;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;

import javax.swing.JLabel;
/**
*
* @author arielespiritu
*/
public class MainFrame extends
javax.swing.JFrame {
/**
* Creates new form MainFrame
*/
public static SimpleDateFormat
dateFormat,timeFormat;
public static Date date;
JFreeChart pieChart;
ChartPanel chartPanel;
public DepartmentFrame department;
public DepartmentList departmentList;
public EmployeeFrame employee;
public AddEmployee addEmployee;
public ViewContactDetail contactDetail;
public ViewAddressDetails addressDetail;
public CompanyList companyList;
public AddCompany addCompany;
public SupplierList supplierList;
public AddSupplier addSupplier;
public ProductList prodList;
public AddProduct addProduct;
public ProdCategoryList prodCatList;
public AddProdCategory addProdCat;
public ViewProductDetails
viewProdDetails;

public ParkingOfVehicle parking;


public WarehouseFrame warehouse;
public CriticalLevel crit;
public AddCriticalLevel addcrit;
public AddInventoryMonitoring
addMonitoring;
public MonitoringInventory monitoring;
public AddWarehouseFrame
addWarehouse;
public InventoryDetails inventoryDetails;
public ProductIn prodin;
public WarehouseList whlist;
public LoginVehicle loginV;
public LogoutVehicle logoutV;
public InventoryDeployment
invDeployment;
public BOProductList boList;
public AddBOProducts addBO;
public FormsFrame forms;
public ReportsFrame reports;
public PurchaseRequest purchaseRequest;
public AddPurchaseRequest
addPurRequest;
public JobOrders jobOrder;
private static final long serialVersionUID
= 1L;
public static boolean isLoading=false;
int width =0;
int height=0;
public MainFrame() {
new LoginForm().setVisible(true);

public PositionFrame position;


public AddPostion addPosition;
load=new LoadingFrame();
load.setVisible(false);
public static LoadingFrame load;
public TransportationManagement
transport;
public GPSTracking gps;
public SettingsYard yard;

initComponents();

warehouse = new
WarehouseFrame(this);
warehouse.setVisible(false);
deskPane.add(warehouse);
crit=new CriticalLevel(this);
crit.setVisible(false);
deskPane.add(crit);
addcrit=new AddCriticalLevel(this);
addcrit.setVisible(false);
deskPane.add(addcrit);
addMonitoring=new
AddInventoryMonitoring(this);
addMonitoring.setVisible(false);
deskPane.add(addMonitoring);
monitoring=new
MonitoringInventory(this);
monitoring.setVisible(false);
deskPane.add(monitoring);
addWarehouse=new
AddWarehouseFrame(this);
addWarehouse.setVisible(false);
deskPane.add(addWarehouse);
inventoryDetails=new
InventoryDetails(this);
inventoryDetails.setVisible(false);
deskPane.add(inventoryDetails);
prodin=new ProductIn(this);
prodin.setVisible(false);
deskPane.add(prodin);
whlist=new WarehouseList(this);
whlist.setVisible(false);
deskPane.add(whlist);
transport=new
TransportationManagement(this);
transport.setVisible(false);
deskPane.add(transport);
gps=new GPSTracking(this);
gps.setVisible(false);
deskPane.add(gps);
yard=new SettingsYard(this);
yard.setVisible(false);
deskPane.add(yard);
parking=new ParkingOfVehicle(this);
parking.setVisible(false);
deskPane.add(parking);

loginV=new LoginVehicle(this);
loginV.setVisible(false);
deskPane.add(loginV);
logoutV=new LogoutVehicle(this);
logoutV.setVisible(false);
deskPane.add(logoutV);
department=new
DepartmentFrame(this);
department.setVisible(false);
deskPane.add(department);
departmentList=new
DepartmentList(this);
departmentList.setVisible(false);
deskPane.add(departmentList);
employee=new EmployeeFrame(this);
employee.setVisible(false);
deskPane.add(employee);
addEmployee=new
AddEmployee(this);
addEmployee.setVisible(false);
deskPane.add(addEmployee);
position=new PositionFrame(this);
position.setVisible(false);
deskPane.add(position);
addPosition=new AddPostion(this);
addPosition.setVisible(false);
deskPane.add(addPosition);
contactDetail=new
ViewContactDetail(this);
contactDetail.setVisible(false);
deskPane.add(contactDetail);
addressDetail=new
ViewAddressDetails(this);
addressDetail.setVisible(false);
deskPane.add(addressDetail);
companyList=new CompanyList(this);
companyList.setVisible(false);
deskPane.add(companyList);
addCompany=new AddCompany(this);
addCompany.setVisible(false);
deskPane.add(addCompany);
supplierList=new SupplierList(this);
supplierList.setVisible(false);
deskPane.add(supplierList);
addSupplier=new AddSupplier(this);

addSupplier.setVisible(false);
deskPane.add(addSupplier);
prodList=new ProductList(this);
prodList.setVisible(false);
deskPane.add(prodList);
addProduct=new AddProduct(this);
addProduct.setVisible(false);
deskPane.add(addProduct);
prodCatList=new
ProdCategoryList(this);
prodCatList.setVisible(false);
deskPane.add(prodCatList);
addProdCat=new
AddProdCategory(this);
addProdCat.setVisible(false);
deskPane.add(addProdCat);
viewProdDetails=new
ViewProductDetails(this);
viewProdDetails.setVisible(false);
deskPane.add(viewProdDetails);
boList=new BOProductList(this);
boList.setVisible(false);
deskPane.add(boList);
addBO=new AddBOProducts(this);
addBO.setVisible(false);
deskPane.add(addBO);
forms=new FormsFrame(this);
forms.setVisible(false);
deskPane.add(forms);
reports=new ReportsFrame(this);
reports.setVisible(false);
deskPane.add(reports);
purchaseRequest=new
PurchaseRequest(this);
purchaseRequest.setVisible(false);
deskPane.add(purchaseRequest);
addPurRequest=new
AddPurchaseRequest(this);
addPurRequest.setVisible(false);
deskPane.add(addPurRequest);
jobOrder=new JobOrders(this);
jobOrder.setVisible(false);
deskPane.add(jobOrder);

invDeployment=new
InventoryDeployment(this);
invDeployment.setVisible(false);
deskPane.add(invDeployment);

this.setBounds(GraphicsEnvironment.getLo
calGraphicsEnvironment().getMaximumWin
dowBounds());
if(config.inetConnection=true){
internetStatus.setForeground(Color.GREEN)
;
internetStatus.setText("Online");
}else{
internetStatus.setForeground(Color.RED);
internetStatus.setText("Offline");
}
Thread t = new Thread(new Runnable()
{
@Override
public void run(){
boolean bool =true;
while(true){
dateTime.setText(getDate()+"
"+getTime());
////
if(bool==true){
////
chartsPanel.removeAll();
////
pieChart =
ChartFactory.createBarChart("Orders", "",
"Score",
createDataset(),PlotOrientation.VERTICAL,
true, true, false);

////
chartPanel = new
ChartPanel(pieChart);
////
pieChart.removeLegend();
////
chartPanel.setBounds(5, 5,
chartsPanel.getWidth()-10,
chartsPanel.getHeight()-10);
////
chartsPanel.add(chartPanel);
////
chartsPanel.repaint();
////
bool =false;
////
}
try{Thread.sleep(1000);}catch(Exception e)
{}
}
}
});t.start();
Thread t2 = new Thread(new
Runnable(){
@Override
public void run(){
while(true){
checkInternet();
try{Thread.sleep(20000);}catch(Exception
e){}
}
}

width=deskPane.getWidth();
height=deskPane.getHeight();
desktopLbl.setBounds(0, 0,
width, height);
// getImageForProduct();
deskPane.setPosition(desktopLbl, -1);
try{Thread.sleep(500);}catch(Exception e)
{}
}
}
});desktop.start();
Thread loads = new Thread(new
Runnable(){
@Override
public void run(){
while(true){
if(isLoading==true){
load.setVisible(true);
Graphics
graph=load.getGraphics();
load.paint(graph);
load.setAlwaysOnTop(true);
}else if(isLoading==false){
load.setVisible(false);
load.setAlwaysOnTop(false);
}

});t2.start();
Thread desktop = new Thread(new
Runnable(){
@Override

try{Thread.sleep(1000);}catch(Exception e)
{}
}
}
});loads.start();

public void run(){


while(true){

//
//
//

return resizedImage;
}
public void createGraph(){

//////////////////////////////////////////methods//////////
//////////////////////////////
// public void getImageForProduct(){
// File file;
// BufferedImage bi;
//
// boolean withImage=false;
//
//
try{
//
file = new
File("/eosystem/icon/desktop2.jpg");
//
bi=ImageIO.read(file);
//
bi= resizeImage(bi,bi.getType() ==
0? BufferedImage.TYPE_INT_ARGB :
bi.getType(),width,height);
//
desktopLbl.setText("");
//
desktopLbl.setIcon(new
ImageIcon(bi));
//
//
}catch(Exception ee){
//
//
}
//
//
// }
// public static BufferedImage
resizeImage(BufferedImage originalImage,
int type,int IMG_WIDTH,int
IMG_HEIGHT){
//
BufferedImage resizedImage = new
BufferedImage(IMG_WIDTH,
IMG_HEIGHT, type);
//
Graphics2D g =
resizedImage.createGraphics();
//
g.drawImage(originalImage, 0, 0,
IMG_WIDTH, IMG_HEIGHT, null);
//
g.dispose();

invDeployment.chartsPanel.removeAll();
pieChart =
ChartFactory.createBarChart("Over All
Product Inventory", "", "Quantity",
createDataset(invDeployment.products,invD
eployment.quantity,invDeployment.unit),Plo
tOrientation.VERTICAL, true, true, false);
chartPanel = new
ChartPanel(pieChart);
pieChart.removeLegend();
chartPanel.setBounds(5, 5,
invDeployment.chartsPanel.getWidth()-10,
invDeployment.chartsPanel.getHeight()-10);
invDeployment.chartsPanel.add(chartPanel);
invDeployment.chartsPanel.repaint();
}
private CategoryDataset
createDataset(ArrayList<String>
product,ArrayList<String>
quantity,ArrayList<String> unit) {
final String mon = "Over All";
final DefaultCategoryDataset dataset =
new DefaultCategoryDataset();
int n =0;
for(int x=0;x<product.size();x++){
n=Integer.parseInt(quantity.get(x).toString())
;
dataset.addValue(n,"yearly"
,unit.get(x).toString()
+"("+product.get(x).toString()+")");
}

return dataset;

}
private XYDataset createDataset2() {
final XYSeries firefox = new
XYSeries("delivery1");
firefox.add(10, 0);
firefox.add(50, 80);
firefox.add(100, 100);

timeFormat = new
SimpleDateFormat("HH:mm:ss");
date = new Date();
s=timeFormat.format(date);
return s;
}
public static boolean testInet(String site)
{
boolean connectivity;

final XYSeries chrome = new


XYSeries("delivery2");
chrome.add(20, 0);
chrome.add(70,50);
chrome.add(90, 100);

try {
URL url = new URL(site);
URLConnection conn =
url.openConnection();
conn.connect();
connectivity = true;

final XYSeries iexplorer = new


XYSeries("delivery3");
iexplorer.add(33.0, 0);
iexplorer.add(60,50);
iexplorer.add(88,100);

System.out.println("Dude its
Working Fine ! ");
} catch (Exception e) {
connectivity = false;
System.out.println("Not Working");
}

final XYSeriesCollection dataset = new


XYSeriesCollection();
dataset.addSeries(firefox);
dataset.addSeries(chrome);
dataset.addSeries(iexplorer);
return dataset;
}
public static String getDate(){
String s="";
dateFormat = new
SimpleDateFormat("yyyy-MM-dd");
date = new Date();
s=dateFormat.format(date);
return s;
}
public static String getTime(){
String s="";

return connectivity;
}
private void checkInternet(){
if(testInet("http://www.google.com/")==true
){
internetStatus.setForeground(Color.GREEN)
;
internetStatus.setText("Online");
}else{
internetStatus.setForeground(Color.RED);
internetStatus.setText("Offline");
}
}
/**

* This method is called from within the


constructor to initialize the form.
* WARNING: Do NOT modify this code.
The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jLabel4 = new javax.swing.JLabel();
empID = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
dateTime = new javax.swing.JLabel();
internetStatus = new
javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jPanel9 = new javax.swing.JPanel();
jButton16 = new
javax.swing.JButton();
jButton17 = new
javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton14 = new
javax.swing.JButton();
jButton13 = new
javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton18 = new
javax.swing.JButton();
jButton19 = new
javax.swing.JButton();
jButton15 = new
javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();

jButton1 = new javax.swing.JButton();


jButton10 = new
javax.swing.JButton();
jButton11 = new
javax.swing.JButton();
jButton12 = new
javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jPanel11 = new javax.swing.JPanel();
chartsPanel = new
javax.swing.JPanel();
deskPane = new
javax.swing.JDesktopPane();
desktopLbl = new
javax.swing.JLabel();
jMenuBar1 = new
javax.swing.JMenuBar();
jMenu11 = new javax.swing.JMenu();
jMenuItem1 = new
javax.swing.JMenuItem();
jMenuItem3 = new
javax.swing.JMenuItem();
jMenuItem5 = new
javax.swing.JMenuItem();
jMenuItem6 = new
javax.swing.JMenuItem();
jMenuItem8 = new
javax.swing.JMenuItem();
jMenuItem9 = new
javax.swing.JMenuItem();
jMenuItem10 = new
javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenu6 = new javax.swing.JMenu();
jMenuItem11 = new
javax.swing.JMenuItem();
jMenuItem12 = new
javax.swing.JMenuItem();
jMenuItem13 = new
javax.swing.JMenuItem();
jMenuItem18 = new
javax.swing.JMenuItem();
jMenuItem36 = new
javax.swing.JMenuItem();
jMenu7 = new javax.swing.JMenu();

jMenuItem14 = new
javax.swing.JMenuItem();
jMenuItem15 = new
javax.swing.JMenuItem();
jMenuItem16 = new
javax.swing.JMenuItem();
jMenu8 = new javax.swing.JMenu();
jMenuItem19 = new
javax.swing.JMenuItem();
jMenuItem17 = new
javax.swing.JMenuItem();
jMenu9 = new javax.swing.JMenu();
jMenuItem20 = new
javax.swing.JMenuItem();
jMenuItem21 = new
javax.swing.JMenuItem();
jMenuItem22 = new
javax.swing.JMenuItem();
jMenu10 = new javax.swing.JMenu();
jMenuItem23 = new
javax.swing.JMenuItem();
jMenuItem24 = new
javax.swing.JMenuItem();
jMenuItem25 = new
javax.swing.JMenuItem();
jMenu13 = new javax.swing.JMenu();
jMenuItem29 = new
javax.swing.JMenuItem();
jMenuItem30 = new
javax.swing.JMenuItem();
jMenuItem31 = new
javax.swing.JMenuItem();
jMenu12 = new javax.swing.JMenu();
jMenuItem26 = new
javax.swing.JMenuItem();
jMenuItem27 = new
javax.swing.JMenuItem();
jMenuItem28 = new
javax.swing.JMenuItem();
jMenuItem37 = new
javax.swing.JMenuItem();
jMenuItem38 = new
javax.swing.JMenuItem();
jMenu5 = new javax.swing.JMenu();
jMenuItem7 = new
javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();


jMenuItem32 = new
javax.swing.JMenuItem();
jMenu1 = new javax.swing.JMenu();
jMenuItem34 = new
javax.swing.JMenuItem();
jMenuItem35 = new
javax.swing.JMenuItem();
jMenu4 = new javax.swing.JMenu();
jMenuItem33 = new
javax.swing.JMenuItem();
jMenu14 = new javax.swing.JMenu();
jMenuItem2 = new
javax.swing.JMenuItem();
jMenuItem4 = new
javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.Wind
owConstants.EXIT_ON_CLOSE);
setUndecorated(true);
jPanel1.setBackground(new
java.awt.Color(255, 255, 255));
jPanel1.setBorder(javax.swing.BorderFactor
y.createLineBorder(new java.awt.Color(255,
255, 255)));
jPanel2.setBackground(new
java.awt.Color(0, 0, 0));
jPanel2.setBorder(javax.swing.BorderFactor
y.createLineBorder(new java.awt.Color(0, 0,
0)));
jLabel4.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel4.setForeground(new
java.awt.Color(255, 255, 255));
jLabel4.setText("Emp ID:");
empID.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
empID.setForeground(new
java.awt.Color(255, 255, 255));

jLabel9.setText("Status :");
empID.setHorizontalAlignment(javax.swing
.SwingConstants.CENTER);
empID.setText("140001");
jLabel6.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel6.setForeground(new
java.awt.Color(255, 255, 255));
jLabel6.setText("Department:");
jLabel7.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel7.setForeground(new
java.awt.Color(255, 255, 255));
jLabel7.setText("warehouse");

jLabel10.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel10.setForeground(new
java.awt.Color(255, 255, 255));
jLabel10.setText("User name:");
jLabel11.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel11.setForeground(new
java.awt.Color(255, 255, 255));
jLabel11.setHorizontalAlignment(javax.swi
ng.SwingConstants.CENTER);
jLabel11.setText("dhagz");

jLabel8.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel8.setForeground(new
java.awt.Color(255, 255, 255));
jLabel8.setText("Date & Time:");

javax.swing.GroupLayout
jPanel2Layout = new
javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(

dateTime.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
dateTime.setForeground(new
java.awt.Color(255, 255, 255));

jPanel2Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)

dateTime.setHorizontalAlignment(javax.swi
ng.SwingConstants.LEFT);
dateTime.setText("2014-6-17
00:00:00");
internetStatus.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
internetStatus.setForeground(new
java.awt.Color(204, 0, 0));
internetStatus.setHorizontalAlignment(javax
.swing.SwingConstants.RIGHT);
internetStatus.setText("Offline");
jLabel9.setFont(new
java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel9.setForeground(new
java.awt.Color(255, 255, 255));

.addGroup(jPanel2Layout.createSequentialG
roup()
.addContainerGap()
.addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 96,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(empID,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 94,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)

.addComponent(jLabel10,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 96,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

.addComponent(jLabel9,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 66,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jLabel11,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 94,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(internetStatus,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 71,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addGap(15, 15, 15))
);
jPanel2Layout.setVerticalGroup(

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.UNRELATED)
.addComponent(jLabel6,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 104,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jLabel7,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 105,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jLabel8,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 110,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

jPanel2Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialG
roup()
.addGap(7, 7, 7)
.addGroup(jPanel2Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(internetStatus,
javax.swing.GroupLayout.Alignment.TRAI
LING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Align
ment.TRAILING,
jPanel2Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(dateTime)

.addGroup(jPanel2Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.LE
ADING)

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED, 136,
Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.BA
SELINE)

.addComponent(jLabel10)
.addComponent(jLabel11))
.addGroup(jPanel2Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(jLabel4)
.addComponent(empID)
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(jLabel8)

}
});
jButton17.setBackground(new
java.awt.Color(255, 255, 255));
jButton17.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/settings.jpg"))); //
NOI18N
jButton17.setToolTipText("Settings");
jButton17.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton17ActionPerformed(evt);
}
});

.addComponent(dateTime)
.addComponent(jLabel9)))
.addGap(0, 0,
Short.MAX_VALUE)))
.addContainerGap())
);
jPanel9.setBackground(new
java.awt.Color(0, 0, 0));
jPanel9.setBorder(javax.swing.BorderFactor
y.createLineBorder(new java.awt.Color(0, 0,
0)));
jButton16.setBackground(new
java.awt.Color(255, 255, 255));
jButton16.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/useraccout.jpg"))); //
NOI18N
jButton16.setToolTipText("Accounts");
jButton16.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton16ActionPerformed(evt);

jButton3.setBackground(new
java.awt.Color(255, 255, 255));
jButton3.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/exit.jpg"))); // NOI18N
jButton3.setToolTipText("Exit");
jButton3.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton3ActionPerformed(evt);
}
});
jButton14.setBackground(new
java.awt.Color(255, 255, 255));
jButton14.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/product.jpg"))); //
NOI18N
jButton14.setToolTipText("Products");
jButton14.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {

jButton14ActionPerformed(evt);
}
});
jButton13.setBackground(new
java.awt.Color(255, 255, 255));
jButton13.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/wh.jpg"))); // NOI18N
jButton13.setToolTipText("Warehouses");
jButton13.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton13ActionPerformed(evt);
}
});
jButton6.setBackground(new
java.awt.Color(255, 255, 255));
jButton6.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/company.jpg"))); //
NOI18N
jButton6.setToolTipText("Companies");
jButton6.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton6ActionPerformed(evt);
}
});
jButton4.setBackground(new
java.awt.Color(255, 255, 255));
jButton4.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/dept.png"))); // NOI18N
jButton4.setToolTipText("Departments");
jButton4.addActionListener(new
java.awt.event.ActionListener() {

public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton4ActionPerformed(evt);
}
});
jButton5.setBackground(new
java.awt.Color(255, 255, 255));
jButton5.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/employee.jpg"))); //
NOI18N
jButton5.setToolTipText("Employees");
jButton5.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton5ActionPerformed(evt);
}
});
jButton18.setBackground(new
java.awt.Color(255, 255, 255));
jButton18.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/suppliers.jpg"))); //
NOI18N
jButton18.setToolTipText("Suppliers");
jButton18.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton18ActionPerformed(evt);
}
});
jButton19.setBackground(new
java.awt.Color(255, 255, 255));
jButton19.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/sms1.jpg"))); //
NOI18N
jButton19.setToolTipText("SMS");

jButton19.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton19ActionPerformed(evt);
}
});
jButton15.setBackground(new
java.awt.Color(255, 255, 255));
jButton15.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/email.jpg"))); //
NOI18N
jButton15.setToolTipText("Email");
jButton15.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton15ActionPerformed(evt);
}
});
jButton7.setBackground(new
java.awt.Color(255, 255, 255));
jButton7.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/order.png"))); //
NOI18N
jButton7.setToolTipText("(CRM) lets
you manage customers");
jButton7.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton7.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setBackground(new
java.awt.Color(255, 255, 255));

jButton8.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/supplies.jpg"))); //
NOI18N
jButton8.setToolTipText("(Purchasing)
lets you manage Purchasing");
jButton8.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton8.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton8ActionPerformed(evt);
}
});
jButton9.setBackground(new
java.awt.Color(255, 255, 255));
jButton9.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/production.jpg"))); //
NOI18N
jButton9.setToolTipText("(Production
Planning) lets you manage Production
Planning");
jButton9.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton1.setBackground(new
java.awt.Color(255, 255, 255));
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/production.jpg"))); //
NOI18N
jButton1.setToolTipText("(Production
Execution) lets you manage Production
Execution");
jButton1.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton1ActionPerformed(evt);

}
});
jButton10.setBackground(new
java.awt.Color(255, 255, 255));
jButton10.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/warehouse2.png"))); //
NOI18N
jButton10.setToolTipText("(Warehouse
Management) lets you manage
Warehouses");
jButton10.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton10.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton10ActionPerformed(evt);
}
});
jButton11.setBackground(new
java.awt.Color(255, 255, 255));
jButton11.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/vehicle.png"))); //
NOI18N
jButton11.setToolTipText("(Trnsportation
Management) lets you manage
transportation");
jButton11.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton11.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton11ActionPerformed(evt);
}
});
jButton12.setBackground(new
java.awt.Color(255, 255, 255));

jButton12.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/inventorydeployment.jp
g"))); // NOI18N
jButton12.setToolTipText("(Inventory
Deployment) lets you view overall
inventory");
jButton12.setMargin(new
java.awt.Insets(2, 8, 2, 8));
jButton12.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton12ActionPerformed(evt);
}
});
javax.swing.GroupLayout
jPanel9Layout = new
javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialG
roup()
.addContainerGap()
.addComponent(jButton7,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton8,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)

.addComponent(jButton9,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton10,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton11,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton12,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton5,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton6,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton13,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton14,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton18,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton19,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,

javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton15,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton16,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton17,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addContainerGap())
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialG
roup()
.addGap(5, 5, 5)

.addGroup(jPanel9Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(jPanel9Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addComponent(jButton16,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton17,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton14,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton13,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton6,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton4,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton5,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,

javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton18,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton19,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton15,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE))
.addGroup(jPanel9Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(jButton7,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton8,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton9,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton10,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

.addComponent(jButton11,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton12,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 45,
javax.swing.GroupLayout.PREFERRED_SI
ZE)))
.addGap(5, 5, 5))
);
jPanel3.setBorder(javax.swing.BorderFactor
y.createLineBorder(new java.awt.Color(0, 0,
0)));
jPanel11.setBorder(javax.swing.BorderFacto
ry.createLineBorder(new java.awt.Color(0,
0, 0)));
chartsPanel.setBackground(new
java.awt.Color(255, 255, 255));
chartsPanel.setBorder(javax.swing.BorderFa
ctory.createLineBorder(new
java.awt.Color(0, 0, 0)));
deskPane.setOpaque(false);
desktopLbl.setHorizontalAlignment(javax.s
wing.SwingConstants.RIGHT);
desktopLbl.setIcon(new
javax.swing.ImageIcon(getClass().getResou
rce("/eosystem/icon/desktop11.png"))); //
NOI18N
desktopLbl.setVerticalAlignment(javax.swin
g.SwingConstants.BOTTOM);
desktopLbl.setBounds(0, 0, 1200, 560);
deskPane.add(desktopLbl,
javax.swing.JLayeredPane.DEFAULT_LAY
ER);

);
javax.swing.GroupLayout
chartsPanelLayout = new
javax.swing.GroupLayout(chartsPanel);
chartsPanel.setLayout(chartsPanelLayout);
chartsPanelLayout.setHorizontalGroup(
chartsPanelLayout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING
)
.addComponent(deskPane)
);
chartsPanelLayout.setVerticalGroup(
chartsPanelLayout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING
)
.addComponent(deskPane,
javax.swing.GroupLayout.DEFAULT_SIZE,
557, Short.MAX_VALUE)
);
javax.swing.GroupLayout
jPanel11Layout = new
javax.swing.GroupLayout(jPanel11);
jPanel11.setLayout(jPanel11Layout);
jPanel11Layout.setHorizontalGroup(
jPanel11Layout.createParallelGroup(javax.s
wing.GroupLayout.Alignment.LEADING)
.addComponent(chartsPanel,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
jPanel11Layout.setVerticalGroup(
jPanel11Layout.createParallelGroup(javax.s
wing.GroupLayout.Alignment.LEADING)
.addComponent(chartsPanel,
javax.swing.GroupLayout.Alignment.TRAI
LING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)

javax.swing.GroupLayout
jPanel3Layout = new
javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel11,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel11,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
javax.swing.GroupLayout
jPanel1Layout = new
javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel9,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jPanel3,
javax.swing.GroupLayout.Alignment.TRAI
LING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jPanel2,
javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialG
roup()
.addGap(8, 8, 8)
.addComponent(jPanel9,
javax.swing.GroupLayout.PREFERRED_SI
ZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jPanel3,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SI
ZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SI
ZE))
);
jMenu11.setText(" Windows ");
jMenuItem1.setText("Crm");
jMenuItem1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem1ActionPerformed(evt);
}

});
jMenu11.add(jMenuItem1);
jMenuItem3.setText("Purchasing");
jMenuItem3.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu11.add(jMenuItem3);
jMenuItem5.setText("Production
Planning");
jMenu11.add(jMenuItem5);
jMenuItem6.setText("Production
Execution");
jMenu11.add(jMenuItem6);
jMenuItem8.setText("Warehouse");
jMenuItem8.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem8ActionPerformed(evt);
}
});
jMenu11.add(jMenuItem8);
jMenuItem9.setText("Transportation");
jMenuItem9.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem9ActionPerformed(evt);
}
});
jMenu11.add(jMenuItem9);

jMenuItem10.setText("Inventory
Deployment");
jMenu11.add(jMenuItem10);
jMenuBar1.add(jMenu11);
jMenu2.setText(" Modules ");
jMenu6.setText("Employees");
jMenuItem11.setText("List of
Employees");
jMenuItem11.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem11ActionPerformed(evt);
}
});
jMenu6.add(jMenuItem11);
jMenuItem12.setText("Add
Employee");
jMenuItem12.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem12ActionPerformed(evt);
}
});
jMenu6.add(jMenuItem12);
jMenuItem13.setText("Update
Employee");
jMenuItem13.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem13ActionPerformed(evt);

}
});
jMenu6.add(jMenuItem13);
jMenuItem18.setText("Positions List");
jMenuItem18.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem18ActionPerformed(evt);
}
});
jMenu6.add(jMenuItem18);
jMenuItem36.setText("Add Position");
jMenuItem36.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem36ActionPerformed(evt);
}
});
jMenu6.add(jMenuItem36);
jMenu2.add(jMenu6);
jMenu7.setText("Companies");
jMenuItem14.setText("List of
Companies");
jMenuItem14.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem14ActionPerformed(evt);
}
});
jMenu7.add(jMenuItem14);

jMenuItem15.setText("Add
Company");
jMenuItem15.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem15ActionPerformed(evt);
}
});
jMenu7.add(jMenuItem15);
jMenuItem16.setText("Update
Company");
jMenuItem16.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem16ActionPerformed(evt);
}
});
jMenu7.add(jMenuItem16);

jMenuItem17.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem17ActionPerformed(evt);
}
});
jMenu8.add(jMenuItem17);
jMenu2.add(jMenu8);
jMenu9.setText("User Accounts");
jMenuItem20.setText("Add Account");
jMenu9.add(jMenuItem20);
jMenuItem21.setText("Update
Account");
jMenu9.add(jMenuItem21);
jMenuItem22.setText("Activate /
DeActivate Account");
jMenu9.add(jMenuItem22);

jMenu2.add(jMenu7);

jMenu2.add(jMenu9);

jMenu8.setText("Departments");

jMenu10.setText("Warehouses");

jMenuItem19.setText("List of
Departments");
jMenuItem19.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {

jMenuItem23.setText("List of
Warehouses");
jMenuItem23.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {

jMenuItem19ActionPerformed(evt);
}
});
jMenu8.add(jMenuItem19);

jMenuItem23ActionPerformed(evt);
}
});
jMenu10.add(jMenuItem23);

jMenuItem17.setText("Add
Department");

jMenuItem24.setText("Add
Warehouse");

jMenuItem24.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem24ActionPerformed(evt);
}
});
jMenu10.add(jMenuItem24);
jMenuItem25.setText("Update
Warehouse");
jMenuItem25.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem25ActionPerformed(evt);
}
});
jMenu10.add(jMenuItem25);
jMenu2.add(jMenu10);
jMenu13.setText("Suppliers");
jMenuItem29.setText("List of
Suppliers");
jMenuItem29.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem29ActionPerformed(evt);
}
});
jMenu13.add(jMenuItem29);
jMenuItem30.setText("Add Supplier");
jMenuItem30.addActionListener(new
java.awt.event.ActionListener() {

public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem30ActionPerformed(evt);
}
});
jMenu13.add(jMenuItem30);
jMenuItem31.setText("Update
Supplier");
jMenuItem31.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem31ActionPerformed(evt);
}
});
jMenu13.add(jMenuItem31);
jMenu2.add(jMenu13);
jMenu12.setText("Products");
jMenuItem26.setText("List of
Products");
jMenuItem26.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem26ActionPerformed(evt);
}
});
jMenu12.add(jMenuItem26);
jMenuItem27.setText("Add Products");
jMenuItem27.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {

jMenuItem27ActionPerformed(evt);
}
});
jMenu12.add(jMenuItem27);
jMenuItem28.setText("Update
Products");
jMenuItem28.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem28ActionPerformed(evt);
}
});
jMenu12.add(jMenuItem28);

jMenuBar1.add(jMenu2);
jMenu5.setText(" Audit Trails ");
jMenuItem7.setText("View Audit
Trails");
jMenuItem7.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem7ActionPerformed(evt);
}
});
jMenu5.add(jMenuItem7);
jMenuBar1.add(jMenu5);

jMenuItem37.setText("Product
Category List");
jMenuItem37.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem37ActionPerformed(evt);
}
});
jMenu12.add(jMenuItem37);
jMenuItem38.setText("Add Product
Category");
jMenuItem38.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem38ActionPerformed(evt);
}
});
jMenu12.add(jMenuItem38);
jMenu2.add(jMenu12);

jMenu3.setText(" Settings ");


jMenuItem32.setText("All Settings");
jMenu3.add(jMenuItem32);
jMenuBar1.add(jMenu3);
jMenu1.setText(" Help ");
jMenuItem34.setText("Users Guide");
jMenu1.add(jMenuItem34);
jMenuItem35.setText("Activate
ToolTipText");
jMenu1.add(jMenuItem35);
jMenuBar1.add(jMenu1);
jMenu4.setText(" About ");
jMenuItem33.setText("Developers");
jMenu4.add(jMenuItem33);
jMenuBar1.add(jMenu4);
jMenu14.setText(" Accounts ");

jMenuItem2.setText("Switch User");
jMenuItem2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu14.add(jMenuItem2);
jMenuItem4.setText("Exit");
jMenuItem4.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jMenuItem4ActionPerformed(evt);
}
});
jMenu14.add(jMenuItem4);

.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
setSize(new java.awt.Dimension(1200,
700));
setLocationRelativeTo(null);
}// </editor-fold>
private void
jMenuItem2ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
int n =
JOptionPane.showConfirmDialog(this, "are
you sure you want to log
out?","",JOptionPane.OK_CANCEL_OPTI
ON);
if(n==JOptionPane.OK_OPTION){
this.dispose();
this.dispose();
new LoginForm().setVisible(true);
new MainFrame().setVisible(true);

jMenuBar1.add(jMenu14);
}
setJMenuBar(jMenuBar1);
}
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane()
);
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)

private void
jMenuItem4ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
int n =
JOptionPane.showConfirmDialog(this, "are
you sure you want to
exit?","",JOptionPane.OK_CANCEL_OPTI
ON);
if(n==JOptionPane.OK_OPTION){
this.dispose();
System.exit(1);
try {
config.con.close();
} catch (SQLException ex) {

Logger.getLogger(MainFrame.class.getNam
e()).log(Level.SEVERE, null, ex);
}
}
}
private void
jButton12ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
invDeployment.setVisible(true);
try {
invDeployment.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
invDeployment.setFocusable(true);
}
private void
jMenuItem7ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
}
private void
jMenuItem1ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
}
private void
jMenuItem3ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
}
private void
jMenuItem11ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
employee.setVisible(true);

employee.getEmployees();
try {
employee.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
employee.setFocusable(true);
}
private void
jMenuItem12ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addEmployee.setVisible(true);
addEmployee.srcBtn.setVisible(false);
addEmployee.setTitle("Add
Employee");
addEmployee.titleLbl.setText("Add
Employee");
addEmployee.saveBtn.setText("Save");
addEmployee.clrBtn.setVisible(true);
addEmployee.updateCheck.setVisible(false);
addEmployee.updateCheck.setSelected(false
);
addEmployee.id1.setEditable(false);
addEmployee.getDepartments();
addEmployee.getPositions();
addEmployee.clear();
addEmployee.id1.setText(addEmployee.get
NextEmpID());
addEmployee.id2.setText(addEmployee.get
NextContactDetailID());
addEmployee.id3.setText(addEmployee.get
NextAddressID());
try {
addEmployee.setSelected(true);
} catch (PropertyVetoException ex) {

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addEmployee.setFocusable(true);
}
private void
jMenuItem27ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addProduct.setVisible(true);
addProduct.srcBtn.setVisible(false);
addProduct.setTitle("Add Product");
addProduct.titleLbl.setText("Add
Product");
addProduct.saveBtn.setText("Save");
addProduct.clrBtn.setVisible(true);
addProduct.updateCheck.setVisible(false);
addProduct.getCategory();
addProduct.getSupplier();
addProduct.clear();
try {
addProduct.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addProduct.setFocusable(true);
}
private void
jMenuItem30ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addSupplier.setVisible(true);
addSupplier.srcBtn2.setVisible(false);
addSupplier.srcBtn.setVisible(true);
addSupplier.setTitle("Add Supplier");
addSupplier.titleLbl.setText("Add
Supplier");
addSupplier.saveBtn.setText("Save");
addSupplier.clrBtn.setVisible(true);

addSupplier.updateCheck.setVisible(false);
addSupplier.updateCheck1.setVisible(true);
addSupplier.id4.setEditable(false);
addSupplier.clear();
addSupplier.id1.setEditable(true);
addSupplier.id1.setText("");
addSupplier.id3.setText("");
addSupplier.id2.setText("");
addSupplier.id4.setText(addSupplier.getNext
SupplierID());
addSupplier.setEditableAll(false);
try {
addSupplier.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addSupplier.setFocusable(true);
}
private void
jButton3ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
int n =
JOptionPane.showConfirmDialog(this, "are
you sure you want to
exit?","",JOptionPane.OK_CANCEL_OPTI
ON);
if(n==JOptionPane.OK_OPTION){
this.dispose();
try {
config.con.close();
} catch (SQLException ex) {
Logger.getLogger(MainFrame.class.getNam
e()).log(Level.SEVERE, null, ex);
}
System.exit(1);
}
}

private void
jButton16ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
}
private void
jButton17ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
}
private void
jMenuItem13ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addEmployee.setVisible(true);
addEmployee.srcBtn.setVisible(true);
addEmployee.setTitle("Update
Employee");
addEmployee.titleLbl.setText("Update
Employee");
addEmployee.saveBtn.setText("Update");
addEmployee.clrBtn.setVisible(false);
addEmployee.updateCheck.setVisible(true);
addEmployee.updateCheck.setSelected(true)
;
addEmployee.id1.setText("");
addEmployee.id1.setEditable(true);
addEmployee.id2.setText("");
addEmployee.id3.setText("");
addEmployee.getDepartments();
addEmployee.getPositions();
addEmployee.clear();
try {
addEmployee.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addEmployee.setFocusable(true);
}

private void
jMenuItem19ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
departmentList.setVisible(true);
departmentList.getDepartments();
try {
departmentList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
departmentList.setFocusable(true);
}
private void
jMenuItem17ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
department.setVisible(true);
department.deptID.setText(department.getN
ewDeptID());
try {
department.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
department.setFocusable(true);
}
private void
jMenuItem8ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
warehouse.setVisible(true);
warehouse.getWarehouse();
warehouse.getInventoryProducts();
try {
warehouse.setSelected(true);
} catch (PropertyVetoException ex) {

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
warehouse.setFocusable(true);
}
private void
jMenuItem9ActionPerformed(java.awt.event
.ActionEvent evt) {
// TODO add your handling code here:
transport.setVisible(true);
try {
transport.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
transport.setFocusable(true);
}
private void
jMenuItem23ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
whlist.setVisible(true);
whlist.getWarehouse();
try {
whlist.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
whlist.setFocusable(true);
}
private void
jMenuItem24ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addWarehouse.setVisible(true);
addWarehouse.srcBtn.setVisible(false);
addWarehouse.setTitle("Add
Warehouse");

addWarehouse.titleLbl.setText("Add
Warehouse");
addWarehouse.saveBtn.setText("Save");
addWarehouse.clrBtn.setVisible(true);
addWarehouse.updateCheck.setVisible(false
);
addWarehouse.id1.setEditable(false);
addWarehouse.clear();
addWarehouse.id1.setText(addWarehouse.ge
tNextWarehouseID());
addWarehouse.id2.setText(addWarehouse.ge
tNextContactDetailID());
addWarehouse.id3.setText(addWarehouse.ge
tNextAddressID());
try {
addWarehouse.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addWarehouse.setFocusable(true);
}
private void
jMenuItem25ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addWarehouse.setVisible(true);
addWarehouse.srcBtn.setVisible(true);
addWarehouse.setTitle("Update
Warehouse");
addWarehouse.titleLbl.setText("Update
Warehouse");
addWarehouse.saveBtn.setText("Update");
addWarehouse.clrBtn.setVisible(false);
addWarehouse.updateCheck.setVisible(true)
;

addWarehouse.updateCheck.setSelected(true
);
addWarehouse.id1.setText("");
addWarehouse.id1.setEditable(true);
addWarehouse.id2.setText("");
addWarehouse.id3.setText("");
try {
addWarehouse.setSelected(true);
} catch (PropertyVetoException ex) {

addCompany.updateCheck.setVisible(false);
addCompany.id1.setEditable(false);
addCompany.clear();

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addWarehouse.setFocusable(true);
}

addCompany.id3.setText(addCompany.getN
extAddressID());
try {
addCompany.setSelected(true);
} catch (PropertyVetoException ex) {

private void
jMenuItem14ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
companyList.setVisible(true);
companyList.getCompany();
try {
companyList.setSelected(true);
} catch (PropertyVetoException ex) {

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addCompany.setFocusable(true);
}

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
companyList.setFocusable(true);
}
private void
jMenuItem15ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addCompany.setVisible(true);
addCompany.srcBtn.setVisible(false);
addCompany.setTitle("Add
Company");
addCompany.titleLbl.setText("Add
Company");
addCompany.saveBtn.setText("Save");
addCompany.clrBtn.setVisible(true);

addCompany.id1.setText(addCompany.getN
extCompanyID());
addCompany.id2.setText(addCompany.getN
extContactDetailID());

private void
jMenuItem16ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addCompany.setVisible(true);
addCompany.srcBtn.setVisible(true);
addCompany.setTitle("Update
Company");
addCompany.titleLbl.setText("Update
Company");
addCompany.saveBtn.setText("Update");
addCompany.clrBtn.setVisible(false);
addCompany.updateCheck.setVisible(true);
addCompany.updateCheck.setSelected(true);
addCompany.id1.setText("");
addCompany.id1.setEditable(true);
addCompany.id2.setText("");
addCompany.id3.setText("");
try {
addCompany.setSelected(true);

} catch (PropertyVetoException ex) {


Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addCompany.setFocusable(true);
}
private void
jMenuItem29ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
supplierList.setVisible(true);
supplierList.getCompany();
try {
supplierList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
supplierList.setFocusable(true);
}
private void
jMenuItem31ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addSupplier.setVisible(true);
addSupplier.srcBtn.setVisible(false);
addSupplier.srcBtn2.setVisible(true);
addSupplier.setTitle("Update
Supplier");
addSupplier.titleLbl.setText("Update
Supplier");

addSupplier.id2.setText("");
addSupplier.id3.setText("");
addSupplier.id4.setText("");
addSupplier.id4.setEditable(true);
addSupplier.clear();
addSupplier.setEditableAll(true);
try {
addSupplier.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addSupplier.setFocusable(true);
}
private void
jMenuItem26ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
prodList.setVisible(true);
prodList.getCategory();
prodList.getProducts();
try {
prodList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
prodList.setFocusable(true);
}

addSupplier.updateCheck.setSelected(true);

private void
jMenuItem18ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
position.setVisible(true);
position.getPositions();
try {
position.setSelected(true);
} catch (PropertyVetoException ex) {

addSupplier.updateCheck1.setVisible(false);
addSupplier.id1.setText("");
addSupplier.id1.setEditable(false);

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}

addSupplier.saveBtn.setText("Update");
addSupplier.clrBtn.setVisible(false);
addSupplier.updateCheck.setVisible(true);

position.setFocusable(true);
}

addProdCat.setSelected(true);
} catch (PropertyVetoException ex) {

private void
jMenuItem36ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addPosition.setVisible(true);

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addProdCat.setFocusable(true);
}

addPosition.posID.setText(addPosition.getN
ewPositionID());
try {
addPosition.setSelected(true);
} catch (PropertyVetoException ex) {

private void
jMenuItem28ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addProduct.setVisible(true);
addProduct.srcBtn.setVisible(true);
addProduct.setTitle("Update Product");
addProduct.titleLbl.setText("Update
Product");
addProduct.saveBtn.setText("Update");
addProduct.clrBtn.setVisible(false);

Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addPosition.setFocusable(true);
}
private void
jMenuItem37ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
prodCatList.setVisible(true);
prodCatList.getCategory();
try {
prodCatList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
prodCatList.setFocusable(true);
}
private void
jMenuItem38ActionPerformed(java.awt.eve
nt.ActionEvent evt) {
// TODO add your handling code here:
addProdCat.setVisible(true);
addProdCat.posID.setText(addProdCat.getN
ewCategoryID());
try {

addProduct.updateCheck.setSelected(true);
addProduct.updateCheck.setVisible(true);
addProduct.id1.setEditable(true);
addProduct.getCategory();
addProduct.getSupplier();
addProduct.clear();
try {
addProduct.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
addProduct.setFocusable(true);
}
private void
jButton18ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
supplierList.setVisible(true);
supplierList.getCompany();
try {
supplierList.setSelected(true);

} catch (PropertyVetoException ex) {


Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
supplierList.setFocusable(true);
}
private void
jButton14ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
prodList.setVisible(true);
prodList.getCategory();
prodList.getProducts();
try {
prodList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
prodList.setFocusable(true);
}
private void
jButton13ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
whlist.setVisible(true);
whlist.getWarehouse();
try {
whlist.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
whlist.setFocusable(true);
}
private void
jButton6ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
companyList.setVisible(true);

companyList.getCompany();
try {
companyList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
companyList.setFocusable(true);
}
private void
jButton4ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
departmentList.setVisible(true);
departmentList.getDepartments();
try {
departmentList.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
departmentList.setFocusable(true);
}
private void
jButton5ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
employee.setVisible(true);
employee.getEmployees();
try {
employee.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
employee.setFocusable(true);
}
private void
jButton15ActionPerformed(java.awt.event.
ActionEvent evt) {

// TODO add your handling code here:


}
private void
jButton19ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
}
private void
jButton11ActionPerformed(java.awt.event.A
ctionEvent evt) {
// TODO add your handling code here:
// transpo.setModal(true);
transport.setVisible(true);
try {
transport.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
transport.setFocusable(true);
}
private void
jButton10ActionPerformed(java.awt.event.
ActionEvent evt) {
// TODO add your handling code here:
// warehouse.setModal(true);
warehouse.setVisible(true);
warehouse.getWarehouse();
warehouse.getInventoryProducts();
try {
warehouse.setSelected(true);
} catch (PropertyVetoException ex) {
Logger.getLogger(WarehouseFrame.class.ge
tName()).log(Level.SEVERE, null, ex);
}
warehouse.setFocusable(true);
}

private void
jButton1ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
}
private void
jButton8ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
// MainFrame.load.setModal(false);
////
MainFrame.load.setAlwaysOnTop(false);
////
MainFrame.isLoading=false;
}
private void
jButton7ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
////
MainFrame.isLoading=true;
////
MainFrame.load.setAlwaysOnTop(true);
//MainFrame.load.setModal(true);
}
/**
* @param args the command line
arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed"
desc=" Look and feel setting code (optional)
">
/* If Nimbus (introduced in Java SE 6)
is not available, stay with the default look
and feel.
* For details see
http://download.oracle.com/javase/tutorial/ui
swing/lookandfeel/plaf.html
*/
try {
for
(javax.swing.UIManager.LookAndFeelInfo

info :
javax.swing.UIManager.getInstalledLookAn
dFeels()) {
if
("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(inf
o.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainFra
me.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MainFra
me.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MainFra
me.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
} catch
(javax.swing.UnsupportedLookAndFeelExc
eption ex) {
java.util.logging.Logger.getLogger(MainFra
me.class.getName()).log(java.util.logging.Le
vel.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new
Runnable() {
public void run() {
new MainFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JPanel chartsPanel;

public javax.swing.JLabel dateTime;


public javax.swing.JDesktopPane
deskPane;
private javax.swing.JLabel desktopLbl;
public static javax.swing.JLabel empID;
public static javax.swing.JLabel
internetStatus;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton11;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton13;
private javax.swing.JButton jButton14;
private javax.swing.JButton jButton15;
private javax.swing.JButton jButton16;
private javax.swing.JButton jButton17;
private javax.swing.JButton jButton18;
private javax.swing.JButton jButton19;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu10;
private javax.swing.JMenu jMenu11;
private javax.swing.JMenu jMenu12;
private javax.swing.JMenu jMenu13;
private javax.swing.JMenu jMenu14;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu5;
private javax.swing.JMenu jMenu6;
private javax.swing.JMenu jMenu7;
private javax.swing.JMenu jMenu8;
private javax.swing.JMenu jMenu9;

private javax.swing.JMenuBar
jMenuBar1;
private javax.swing.JMenuItem
jMenuItem1;
private javax.swing.JMenuItem
jMenuItem10;
private javax.swing.JMenuItem
jMenuItem11;
private javax.swing.JMenuItem
jMenuItem12;
private javax.swing.JMenuItem
jMenuItem13;
private javax.swing.JMenuItem
jMenuItem14;
private javax.swing.JMenuItem
jMenuItem15;
private javax.swing.JMenuItem
jMenuItem16;
private javax.swing.JMenuItem
jMenuItem17;
private javax.swing.JMenuItem
jMenuItem18;
private javax.swing.JMenuItem
jMenuItem19;
private javax.swing.JMenuItem
jMenuItem2;
private javax.swing.JMenuItem
jMenuItem20;
private javax.swing.JMenuItem
jMenuItem21;
private javax.swing.JMenuItem
jMenuItem22;
private javax.swing.JMenuItem
jMenuItem23;
private javax.swing.JMenuItem
jMenuItem24;
private javax.swing.JMenuItem
jMenuItem25;
private javax.swing.JMenuItem
jMenuItem26;
private javax.swing.JMenuItem
jMenuItem27;
private javax.swing.JMenuItem
jMenuItem28;
private javax.swing.JMenuItem
jMenuItem29;

private javax.swing.JMenuItem
jMenuItem3;
private javax.swing.JMenuItem
jMenuItem30;
private javax.swing.JMenuItem
jMenuItem31;
private javax.swing.JMenuItem
jMenuItem32;
private javax.swing.JMenuItem
jMenuItem33;
private javax.swing.JMenuItem
jMenuItem34;
private javax.swing.JMenuItem
jMenuItem35;
private javax.swing.JMenuItem
jMenuItem36;
private javax.swing.JMenuItem
jMenuItem37;
private javax.swing.JMenuItem
jMenuItem38;
private javax.swing.JMenuItem
jMenuItem4;
private javax.swing.JMenuItem
jMenuItem5;
private javax.swing.JMenuItem
jMenuItem6;
private javax.swing.JMenuItem
jMenuItem7;
private javax.swing.JMenuItem
jMenuItem8;
private javax.swing.JMenuItem
jMenuItem9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel11;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel9;
// End of variables declaration
}

INVENTORY DEPLOYMENT
CODES
package eosystem.inventory;
import eosystem.MainFrame;
import eosystem.config;
import java.sql.ResultSet;
import java.util.ArrayList;
import javax.swing.JOptionPane;
/**
*
* @author arielespiritu
*/
public class InventoryDeployment extends
javax.swing.JInternalFrame {
/**
* Creates new form
InventoryDeployment
*/
public ArrayList<String> products;
public ArrayList<String> quantity;
public ArrayList<String> unit;
MainFrame main;

public InventoryDeployment(MainFrame
main) {
this.main=main;
initComponents();
}
public void newString(){
products=new ArrayList<String>();
quantity=new ArrayList<String>();
unit=new ArrayList<String>();

uct_unit from wh_inventory a inner join


product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
group by a.product_id,a.product_unit";
}
ResultSet rs=
config.st.executeQuery(query);
while(rs.next()){

}
public void getInventoryProducts(){
String query="";
newString();
try {

products.add(rs.getString(2));
quantity.add(rs.getString(3));
unit.add(rs.getString(4));
}
main.createGraph();
} catch (Exception ex) {
JOptionPane.showMessageDialog(this,"Erro
r "+ex);
}

if(box1.isSelected()&&!box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
group by a.product_id,a.product_unit";
}else if(box1.isSelected()&&!
box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
group by a.product_id,a.product_unit";
}else
if(box1.isSelected()&&box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod

}
public void getInventoryFinishedProducts()
{
String query="";
newString();
try {
if(box1.isSelected()&&!
box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='FINISHED PRODUCT' group
by a.product_id,a.product_unit";
}else if(box1.isSelected()&&!
box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod

uct_unit from wh_inventory a inner join


product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='FINISHED PRODUCT' group
by a.product_id,a.product_unit";
}else
if(box1.isSelected()&&box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='FINISHED PRODUCT' group
by a.product_id,a.product_unit";
}
ResultSet rs=
config.st.executeQuery(query);
while(rs.next()){
products.add(rs.getString(2));
quantity.add(rs.getString(3));
unit.add(rs.getString(4));
}
main.createGraph();
} catch (Exception ex) {
JOptionPane.showMessageDialog(this,"Erro
r "+ex);
}
}
public void getInventoryRawProducts(){
String query="";
newString();
try {
if(box1.isSelected()&&!
box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod

uct_unit from wh_inventory a inner join


product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='RAW MATERIAL' group by
a.product_id,a.product_unit";
}else if(box1.isSelected()&&!
box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='RAW MATERIAL' group by
a.product_id,a.product_unit";
}else
if(box1.isSelected()&&box2.isSelected()){
query="select
a.product_id,b.name,sum(a.quantity),a.prod
uct_unit from wh_inventory a inner join
product b on a.product_id=b.product_id"
+ " where a.recieve_date like
'%"+year.getSelectedItem().toString()+"%'
and b.type='RAW MATERIAL' group by
a.product_id,a.product_unit";
}
ResultSet rs=
config.st.executeQuery(query);
while(rs.next()){
products.add(rs.getString(2));
quantity.add(rs.getString(3));
unit.add(rs.getString(4));
}
main.createGraph();
} catch (Exception ex) {
JOptionPane.showMessageDialog(this,"Erro
r "+ex);
}

}
/**
* This method is called from within the
constructor to initialize the form.
* WARNING: Do NOT modify this code.
The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
titleLbl = new javax.swing.JLabel();
chartsPanel = new
javax.swing.JPanel();
jPanel5 = new javax.swing.JPanel();
issue = new javax.swing.JComboBox();
jLabel1 = new javax.swing.JLabel();
year = new javax.swing.JComboBox();
month = new
javax.swing.JComboBox();
box1 = new javax.swing.JCheckBox();
box2 = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
setBorder(javax.swing.BorderFactory.create
LineBorder(new java.awt.Color(0, 0, 0)));
setClosable(true);
setDefaultCloseOperation(javax.swing.Wind
owConstants.HIDE_ON_CLOSE);
setIconifiable(true);
setMaximizable(true);
setResizable(true);
setTitle("Inventory Deployment");
jPanel2.setBackground(new
java.awt.Color(0, 0, 0));
jPanel2.setBorder(javax.swing.BorderFactor

y.createLineBorder(new java.awt.Color(255,
255, 255)));
jPanel2.setLayout(null);
titleLbl.setFont(new
java.awt.Font("Times New Roman", 1, 24));
// NOI18N
titleLbl.setForeground(new
java.awt.Color(255, 255, 255));
titleLbl.setText("Inventory
Deployment");
jPanel2.add(titleLbl);
titleLbl.setBounds(10, 0, 300, 40);
chartsPanel.setBackground(new
java.awt.Color(255, 255, 255));
chartsPanel.setBorder(javax.swing.BorderFa
ctory.createLineBorder(new
java.awt.Color(0, 0, 0)));
javax.swing.GroupLayout
chartsPanelLayout = new
javax.swing.GroupLayout(chartsPanel);
chartsPanel.setLayout(chartsPanelLayout);
chartsPanelLayout.setHorizontalGroup(
chartsPanelLayout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING
)
.addGap(0, 1178,
Short.MAX_VALUE)
);
chartsPanelLayout.setVerticalGroup(
chartsPanelLayout.createParallelGroup(java
x.swing.GroupLayout.Alignment.LEADING
)
.addGap(0, 468,
Short.MAX_VALUE)
);
jPanel5.setBorder(javax.swing.BorderFactor

y.createLineBorder(new java.awt.Color(0, 0,
0)));
issue.setModel(new
javax.swing.DefaultComboBoxModel(new
String[] { "-- Select Issue --", "Overall
Product Inventory", "Finished Product
Inventory", "Raw Material Inventory",
"Customer Orders", "Production", "Fast
Moving Product", "Slow Moving Product",
"Deliveries", " " }));
issue.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
issueActionPerformed(evt);
}
});
jLabel1.setText("Issues:");
year.setModel(new
javax.swing.DefaultComboBoxModel(new
String[] { "-- Select Year --", "2014",
"2015", "2016", "2017", "2018", "2019",
"2020" }));
year.setEnabled(false);
year.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
yearActionPerformed(evt);
}
});
month.setModel(new
javax.swing.DefaultComboBoxModel(new
String[] { "-- Select Month --", "January",
"February", "March", "April", "May",
"June", "July", "August", "September",
"October", "November", "December" }));
month.setEnabled(false);
month.addActionListener(new
java.awt.event.ActionListener() {

public void
actionPerformed(java.awt.event.ActionEven
t evt) {
monthActionPerformed(evt);
}
});
box1.setText("Yearly");
box1.addItemListener(new
java.awt.event.ItemListener() {
public void
itemStateChanged(java.awt.event.ItemEvent
evt) {
box1ItemStateChanged(evt);
}
});
box1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
box1ActionPerformed(evt);
}
});
box2.setText("Monthly");
box2.addItemListener(new
java.awt.event.ItemListener() {
public void
itemStateChanged(java.awt.event.ItemEvent
evt) {
box2ItemStateChanged(evt);
}
});
box2.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
box2ActionPerformed(evt);
}
});
jButton1.setBackground(new
java.awt.Color(255, 255, 255));
jButton1.setText("generate");

jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.ActionEven
t evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addGap(18, 18, 18)
.addComponent(box2,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 71,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

javax.swing.GroupLayout
jPanel5Layout = new
javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(month,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 128,
javax.swing.GroupLayout.PREFERRED_SI
ZE)

jPanel5Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialG
roup()
.addContainerGap()
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 50,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(issue,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 206,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addGap(42, 42, 42)
.addComponent(box1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 63,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.RELATED)
.addComponent(year,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 128,

.addPreferredGap(javax.swing.LayoutStyle.
ComponentPlacement.UNRELATED)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 114,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addContainerGap(330,
Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createParallelGro
up(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(issue,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 30,
javax.swing.GroupLayout.PREFERRED_SI
ZE))
.addGroup(jPanel5Layout.createParallelGro

up(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(box1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(year,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 30,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(box2,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(month,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 30,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 30,
javax.swing.GroupLayout.PREFERRED_SI
ZE))
);
javax.swing.GroupLayout
jPanel1Layout = new
javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addComponent(chartsPanel,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jPanel5,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jPanel2,
javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.sw
ing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialG
roup()
.addComponent(jPanel2,
javax.swing.GroupLayout.PREFERRED_SI
ZE, 40,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addGap(0, 0, 0)
.addComponent(jPanel5,
javax.swing.GroupLayout.PREFERRED_SI
ZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SI
ZE)
.addGap(10, 10, 10)
.addComponent(chartsPanel,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane()
);
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.Gro
upLayout.Alignment.LEADING)

.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void
issueActionPerformed(java.awt.event.Actio
nEvent evt) {
// TODO add your handling code here:
}

getInventoryFinishedProducts();
}else
if(issue.getSelectedIndex()==3){
getInventoryRawProducts();
}
}else{
JOptionPane.showMessageDialog(this,
"Please select year or month!");
}
}
else{

private void
monthActionPerformed(java.awt.event.Acti
onEvent evt) {
// TODO add your handling code here:
}

JOptionPane.showMessageDialog(this,
"Please select issue!");
}
}

private void
box1ActionPerformed(java.awt.event.Actio
nEvent evt) {
// TODO add your handling code here:
}
private void
box2ActionPerformed(java.awt.event.Actio
nEvent evt) {
// TODO add your handling code here:
}
private void
jButton1ActionPerformed(java.awt.event.Ac
tionEvent evt) {
// TODO add your handling code here:
if(issue.getSelectedIndex()!=0){
if(box1.isSelected()||
box2.isSelected()){
if(issue.getSelectedIndex()==1)
{
getInventoryProducts();
}else
if(issue.getSelectedIndex()==2){

private void
yearActionPerformed(java.awt.event.Action
Event evt) {
// TODO add your handling code here:
}
private void
box1ItemStateChanged(java.awt.event.Item
Event evt) {
// TODO add your handling code here:
if(box1.isSelected()){
year.setSelectedIndex(0);
year.setEnabled(true);
}else{
year.setSelectedIndex(0);
year.setEnabled(false);
}
}
private void
box2ItemStateChanged(java.awt.event.Item
Event evt) {
// TODO add your handling code here:
if(box2.isSelected()){

month.setSelectedIndex(0);
month.setEnabled(true);
}else{
month.setSelectedIndex(0);
month.setEnabled(false);
}
}
// Variables declaration - do not modify
private javax.swing.JCheckBox box1;
private javax.swing.JCheckBox box2;
public javax.swing.JPanel chartsPanel;
private javax.swing.JComboBox issue;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel5;
private javax.swing.JComboBox month;
private javax.swing.JLabel titleLbl;
private javax.swing.JComboBox year;
// End of variables declaration
}

Das könnte Ihnen auch gefallen