Vous êtes sur la page 1sur 70

PROJECT

RESOURCE

ALLOCATOR
BY

HARMANAN GURVINDER KOHLI


B.Tech. (Computer Science & Engineering)
III Year (Roll No.: 10314210022)
Subject: Industrial Training-I [Code: CS0315]

SRM UNIVERSITY HARYANA

1
ACKNOWLEDGMENT

I express thanks and gratitude to Mr. Vimlesh Kumar & Mr. Ayush Kushwaha of
Computer Science Department, Tech Vision for their encouraging support and
guidance in carrying out the project.

I would like to express gratitude and indebtedness to Mr. Siddhesh Sharma,


Head-Technical & Service Delivery Aviral Animation & Technologies Pvt. Ltd for
his valuable advice and guidance without which this project would not have seen
the light of the day.

I would like to thank all the staff members of TechVision & Aviral Animation &
Technologies Pvt. Ltd. for their kind co-operation. I would like to thank my
parents for being supportive all the time, and I am very much obliged to them.

HARMANAN GURVINDER KOHLI


B.Tech. (Computer Science & Engineering)
III Year / A Division

2
CONTENTS
Headings Page No.

Acknowledgement02

1. INTRODUCTION..05
1.1 Project Resource Allocator

2. SYSTEM ANALYSIS07
2.1 Existing System
2.2 Proposed System
2.3 Feasibility Study

3. MODULE DESCRIPTION...11
3.1 Login Form Module
3.2 Resources Form Module
3.3 Project Form Module
3.4 Client Form Module
3.5 Allocation Form Module
3.6 Dashboard Module

4. SYSTEM REQUIREMENTS..14
4.1 Software Requirements
4.2 Hardware Requirements

5. SYSTEM DESIGN...16
5.1 Algorithm
5.2 Source Code
5.3 Database Design
5.3.1 Database Tables
5.3.2 Screens.

3
6. TESTING...62

7. IMPLEMENTATION...65

8. CONCLUSION.....67

9. BIBLIOGRAPHY...69

4
INTRODUCTION
In a software & service delivery organization, the optimal utilization of existing
human capital is a big challenge. There is always a challenge to ensure not only the
existing manpower is optimally deployed to ensure full utilization of the billable
hours, but to also ensure that the manpower is sufficiently provided with the
required skill set training.

This major challenge is one of the biggest factors that decides the net profitability
of the project and ensures that there are no project overruns.

Using the Project Resource Allocator, the Program Manager can find the suitable
resources from the existing team with the suitable skillsets on the projects that
require those skills. A major challenge that is faced by the Program Manager is not
able to quantify the availability of number of billable hours available with the
resources. This factor has also been taken care in this module.

A major assumption that has been taken in this project development is that the
customer is a fictitious organization which has an existing system is a manual
system which is in operation in the small service delivery organization and that it
faces the above mentioned challenges. Some dummy data has been incorporated
into the software to give out the required output.

5
Project

Resource

Allocator

6
SYSTEM ANALYSIS

7
2.1 EXISTING SYSTEM

The HR Administration falls short of controlling the employees


activities in analysing his/her strengths and weakness. The decision for
appraisal of assigning next project to the employee or to train him/her
to enhance the skills where lies with proper projection. He is not
provided with the detailed project information done or to be assigned
based on Application / Verticals.

2.1.1 DRAWBACKS IN EXISTING SYSTEM:

Need of extra manual effort.


It used to take much time to find any employee
Not very much accurate.
Danger of losing the files in some cases.

8
2.2 PROPOSED SYSTEM

Decision in assigning proper skillful hands for the project is an important issue in HR
Module. The HR Administrator should report with the personal holding the
necessary skills required for the project assignment. The decision in making analysis
about the employees skills is a prime important before booting in. The proposed
system of HR Module is the right software to be incorporated into the Automation of
HR Software for helping the organization needs with respect to skillful manpower

The proposed system provides detail general information about the employee along
with Certification, & Skill details. It enhances the HR Management in adding, viewing
and updating employees details and generates various reports regarding employees
skill and experience. Suggestions and Grievances posted by the employees are upheld
for taking care of the necessary steps in forwarding companys obligation.
.
2.2.1 ADVANTAGES OF PROPOSED SYSTEM:

Very fast and accurate.


No need of any extra manual effort.
No fever of data loss.
Just need a little knowledge to operate the system.
Doesnt require any extra hardware device.
At last very easy to find the employees.

9
2.3 FEASIBILITY STUDY

Once the problem is clearly understood, the next step is to conduct feasibility
study, which is high-level capsule version of the entered systems and design
process. The objective is to determine whether or not the proposed system is
feasible. The three tests of feasibility have been carried out.

Technical Feasibility
Economic Feasibility
Operational Feasibility

TECHNICAL FEASIBILITY
In Technical Feasibility study, one has to test whether the proposed system can be
developed using existing technology or not. It is planned to implement the
proposed system using java technology. It is evident that the necessary hardware
and software are available for development and implementation of the proposed
system. Hence, the solution is technically feasible.

ECONOMIC FEASIBILITY
As part of this, the costs and benefits associated with the proposed system
compared and the project is economically feasible only if tangible or intangible
benefits outweigh costs. The system development costs will be significant. So the
proposed system is economically feasible.

OPERATIONAL FEASIBILITY
It is a standard that ensures interoperability without stifling competition and
innovation among users, to the benefit of the public both in terms of cost and
service quality. The proposed system is acceptable to users. So the proposed
system is operationally feasible.

10
MODULE
DESCRIPTION

11
MODULE DISCRIPTION

The list of modules incorporated with Project Resource Allocator is

Login Form Module


Resources Form Module
Project Form Module
Client Form Module
Allocation Form Module
Dashboard Module

Importance of modules in any software development side is we can easily


understand what the system we are developing and what its main uses are. At the
time of project, we may create many modules and finally we combine them to form
a system.

Login Form Module


This module makes sure that only an assigned person can access this software.

Resources Form Module:


This module deals with the management of the employee information such as
the personal details-his name, qualification, skill and available billable hours etc.,

Project Form Module:


This module deals with the management of the projects related with the employee
like-projects that were past dealt, current projects in his account etc. It also assigns
the client id that have given a project.

Client Form Module:


This module deals with the management of the clients who had given
past projects or have given a current project and the status of clients.
12
Allocation Form Module:
This module deals with the assignment of a project to a particular resource
(employee) based on his/her skills. It also assigns the dates that a resource will
work on a particular project along with the required hours in a day.
Note : Number of hours cannot exceed more than 8 hours per day.

Dashboard Module:
This module shows the details of a particular/all projects and resources and also
shows details of available resources that is these resources have not been assigned
any project or not enough number of hours which should be equal to 8 hours.

*Limitation of this System:


This solution being developed to be run in single location, hence the user shall be
able to access the locally available manpower resources.

The future roadmap includes the same to be made Web based system where this
organization with multiple city offices shall be able to access other location based
manpower.

13
SYSTEM
REQUIREMENTS

14
HARDWARE & SOFTWARE

REQUIREMENTS

Software Specification

Language JDK 1.6


Database MySQL
Operating System Windows 8+
RAM 1 GB++

Hardware Specification:

Processor Intel Core based System


Processor Speed 1.5 GHz & Above
RAM 4 GB+
Hard Disk 100 GB++
Key Board 104 keys

15
SYSTEM DESIGN

16
ALGORITHMS

Login Screen
1. Import the Java.swing.Jframe and other necessary packages.
2. Declare the two textfields namely Login and Password.
3. Form connection of class with MySQL server.
4. Implement the search program to match input data with the data in MySQL
server.
5. If the data matches, direct the user to the menu window of the application.
6. If the data does not match, inform the user of the appropriate problem and
insert the required or correct data.
7. Three buttons are added to the application:-
8. Login to match the input data with data in MySQL server.
a. Login to match the input data with data in MySQL server.
b. Cancel to reset the textfields.
c. Exit to close the application.

Menu Screen
1. Import the Java.swing.Jframe and other necessary packages.
2. Buttons are linked to call other classes when clicked by the user.
3. Five buttons are added to the window to direct the user to the appropriate window of
the
9. application and one functionality button:-
a. Dashboard button to direct the users to the Dashboard window of the
application.
b. Allocation Form button to direct the users to the Allocation Form window of
the application.
c. Client Form button to direct the users to the Client Form window of the
application.
d. Project Form button to direct the users to the Project Form window of the
application.
e. Resources Form button to direct the users to the Resources Form window of
the application.
f. Exit button is used to close the application.

Client Form Screen


1. Import the Java.swing.Jframe and other necessary packages.
2. Implement Menu button which will show all the windows in the application.
3. Link the the menu with the other windows in the application.

17
4. Declare three textfields to input Client id, Client name and Client status respectively.
5. Form the connection with the MySQL server.
6. Three buttons are added which perform following functions:-
a. Insert button to insert the data into the MySQL server.
b. Cancel button to reset all the textfields.
c. Exit button to close the application.

Project Form Screen


1. Import the Java.swing.Jframe and other necessary packages.
2. Implement Menu button which will show all the windows in the application.
3. Link the the menu with the other windows in the application.
4. Declare six textfields to input Project id, Project Name, Client id, Starting date,
Ending date and Project status respectively.
5. Form the connection with the MySQL server.
6. Three buttons are added which perform following functions:-
a. Insert button to insert the data into the MySQL server.
b. Cancel button to reset all the textfields.
c. Exit button to close the application.

Resources Form Screen


1. Import the Java.swing.Jframe and other necessary packages.
2. Implement Menu button which will show all the windows in the application.
3. Link the the menu with the other windows in the application.
4. Declare eleven textfields to input Employee id, Employee Name, Date of birth,
Date of joining, Designation, Skillset, Department, Country, Email id, Contact
number and Resources status respectively.
5. Form the connection with the MySQL server.
6. Three buttons are added which perform following functions:-
a. Insert button to insert the data into the MySQL server.
b. Cancel button to reset all the textfields.
c. Exit button to close the application.

Allocation Form Screen


1. Import the Java.swing.Jframe and other necessary packages.
2. Implement Menu button which will show all the windows in the application.
3. Link the the menu with the other windows in the application.Declare four
textfields to input Allocation id, from date, to date and number of hours
respectively.
4. Declare two comboboxes to show project id with name and employee id with
name as well as his/her skillset respectively.

18
5. Form a connection with MySQL server to insert the data into the MySQL server.
6. Buttons are linked to the methods to perform different functions.
7. Three buttons are added which perform following functions:-
a. Insert button to insert the data into the MySQL server.
b. Cancel button to reset all the textfields.
c. Exit button to close the application.

Dashboard Screen
1. Import the Java.swing.Jframe and other necessary packages.
2. Implement Menu button which will show all the windows in the application.
3. Link the the menu with the other windows in the application.
4. Declare two comboboxes for showing the employee id with name and project id
with name respectively.
5. Connect the two comboboxes with MySQL to show the employee id and name
and project id with name respectively.
6. Declare two textfields to input the from date and to date respectively.
7. Buttons are linked to the methods to perform different functions.
8. Three buttons are added which perform following functions:-
a. Search button to search a particular case depending on the user selected
or typed data.
b. Available button to see which employees are not assigned the whole 8
hours.
c. Exit button to close the application.
9. A table is added to the window to show appropriate results.

19
SOURCE CODE
Login Screen
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Toolkit;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import com.mysql.jdbc.PreparedStatement;
import com.mysql.jdbc.ResultSet;
import com.sun.prism.Image;
import javax.swing.JPasswordField;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class LoginForm extends JFrame {
private JTextField Usernametxt;
private JPasswordField PasswordField;
public LoginForm() {
setTitle("Login Form");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblUsername = new JLabel("Username:");
lblUsername.setFont(new Font("Tahoma", Font.BOLD, 14));
lblUsername.setBounds(175, 74, 85, 25);
getContentPane().add(lblUsername);
Usernametxt = new JTextField();
Usernametxt.setToolTipText("Enter the Username");
Usernametxt.setHorizontalAlignment(SwingConstants.CENTER);
Usernametxt.setFont(new Font("Tahoma", Font.BOLD, 14));
Usernametxt.setBounds(279, 76, 236, 20);
getContentPane().add(Usernametxt);
Usernametxt.setColumns(10);
JLabel lblPassword = new JLabel("Password:");
lblPassword.setFont(new Font("Tahoma", Font.BOLD, 14));
lblPassword.setBounds(175, 130, 85, 25);
getContentPane().add(lblPassword);
PasswordField = new JPasswordField();
PasswordField.setToolTipText("Enter the password");
PasswordField.setFont(new Font("Tahoma", Font.BOLD, 14));
PasswordField.setHorizontalAlignment(SwingConstants.CENTER);
PasswordField.setBounds(279, 132, 236, 20);
getContentPane().add(PasswordField);
JButton Loginbtn = new JButton("Login");
Loginbtn.setToolTipText("Login inside the application");
Loginbtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

20
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=null;

con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String Query="Select * from login where username=? and password=?
";
PreparedStatement pst=(PreparedStatement)
con.prepareStatement(Query);
pst.setString(1, Usernametxt.getText());
pst.setString(2,PasswordField.getText());
ResultSet rs=(ResultSet) pst.executeQuery();
int count=0;
while(rs.next()){
count=count+1;
}
if(count==1){
JOptionPane.showMessageDialog(null, "Username and password is
correct");
dispose();
Menu obj=new Menu();
obj.setVisible(true);
obj.setSize(new Dimension(450,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-
obj.getSize().height/2);
}
else if(count>1){
JOptionPane.showMessageDialog(null, " Duplicate Username and
password");
}
else{
JOptionPane.showMessageDialog(null, "Username and password is not correct. Try
Again..");
}
con.close();
}
catch(Exception ee){
JOptionPane.showMessageDialog(null, ee);
}
}
});
Loginbtn.setBounds(203, 208, 89, 25);
getContentPane().add(Loginbtn);

JButton Cancelbtn = new JButton("Cancel");


Cancelbtn.setToolTipText("Reset the fields");
Cancelbtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Usernametxt.setText("");
PasswordField.setText("");
}
});
Cancelbtn.setBounds(313, 208, 89, 23);
getContentPane().add(Cancelbtn);

21
JButton Exitbtn = new JButton("Exit");
Exitbtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
Exitbtn.setToolTipText("Exit the application");
Exitbtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
System.exit(0);
}
});
Exitbtn.setBounds(426, 208, 89, 23);
getContentPane().add(Exitbtn);

JLabel lbl1 = new JLabel("");


java.awt.Image img = new ImageIcon(this.getClass().getResource("/login-
icon.png")).getImage();
lbl1.setIcon(new ImageIcon(img));
lbl1.setBounds(26, 30, 139, 203);
getContentPane().add(lbl1);
}

public static void main(String[] args) {


LoginForm obj1=new LoginForm();
obj1.setVisible(true);
obj1.setSize(new Dimension(700,300));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);

}
}

Menu Screen
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
public class Menu extends JFrame {
public Menu() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("Menu");
getContentPane().setLayout(null);
JButton btnDashboard = new JButton("Dashboard");
btnDashboard.setToolTipText("Will be directed to Dashboard Form");
btnDashboard.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

22
try{
dispose();
Dashboard obj=new Dashboard();
obj.setVisible(true);
obj.setSize(new Dimension(1000,700));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2,
dim.height/2-obj.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null,e1);
}

}
});
btnDashboard.setBounds(162, 17, 100, 23);
getContentPane().add(btnDashboard);

JButton btnAllocationForm = new JButton("Allocation Form");


btnAllocationForm.setToolTipText("Will be directed to Allocation Form");
btnAllocationForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QAllocation obj1=new QAllocation();
obj1.setVisible(true);
obj1.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}
}
});
btnAllocationForm.setBounds(150, 57, 125, 23);
getContentPane().add(btnAllocationForm);

JButton btnClientForm = new JButton("Client Form");


btnClientForm.setToolTipText("Will be directed to Client Form");
btnClientForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QClient obj4=new QClient();
obj4.setVisible(true);
obj4.setSize(new Dimension(430,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj4.setLocation(dim.width/2-obj4.getSize().width/2, dim.height/2-
obj4.getSize().height/2);
}catch(Exception e4){
JOptionPane.showMessageDialog(null, e4);
}
}
});
btnClientForm.setBounds(162, 97, 100, 23);
getContentPane().add(btnClientForm);

23
JButton btnProjectForm = new JButton("Project Form");
btnProjectForm.setToolTipText("Will be directed to Project Form");
btnProjectForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QProject obj5=new QProject();
obj5.setVisible(true);
obj5.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj5.setLocation(dim.width/2-obj5.getSize().width/2, dim.height/2-
obj5.getSize().height/2);
}catch(Exception e5){
JOptionPane.showMessageDialog(null, e5);
}
}
});
btnProjectForm.setBounds(158, 137, 108, 23);
getContentPane().add(btnProjectForm);
JButton btnResourcesForm = new JButton("Resources Form");
btnResourcesForm.setToolTipText("Will be directed to Resources Form");
btnResourcesForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QResources obj3=new QResources();
obj3.setVisible(true);
obj3.setSize(new Dimension(460,460));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj3.setLocation(dim.width/2-obj3.getSize().width/2, dim.height/2-
obj3.getSize().height/2);
}catch(Exception e3){
JOptionPane.showMessageDialog(null, e3);
}
}
});
btnResourcesForm.setBounds(145, 177, 135, 23);
getContentPane().add(btnResourcesForm);
JButton btnExit = new JButton("Exit");
btnExit.setToolTipText("Exit the application");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setBounds(168, 217, 89, 23);
getContentPane().add(btnExit);
}
public static void main(String[] args) {
Menu m=new Menu();
m.setVisible(true);
m.setSize(new Dimension(450,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
m.setLocation(dim.width/2-m.getSize().width/2, dim.height/2-
m.getSize().height/2);
}

24
}
Dashboard Screen
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableModel;
import com.mysql.jdbc.PreparedStatement;
import net.proteanit.sql.DbUtils;
import java.awt.Color;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JList;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JMenu;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JScrollPane;
public class Dashboard extends JFrame {
private JTextField from_date;
private JTextField to_date;
private JTable table_1;
private JTable table;
private JTable table_2;
@SuppressWarnings("unchecked")
public Dashboard() throws ClassNotFoundException, SQLException {
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setTitle("Dashboard");
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("Employee ID:");
lblNewLabel.setBounds(78, 61, 79, 14);
getContentPane().add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("Project ID:");
lblNewLabel_1.setBounds(78, 106, 70, 14);
getContentPane().add(lblNewLabel_1);
JLabel fd1 = new JLabel("From Date:");
fd1.setBounds(78, 150, 70, 14);
getContentPane().add(fd1);
JLabel lblNewLabel_3 = new JLabel("To Date:");
lblNewLabel_3.setBounds(78, 199, 46, 14);
getContentPane().add(lblNewLabel_3);
JComboBox comboBox = new JComboBox();

25
comboBox.setToolTipText("Select Employee ID");
comboBox.setBounds(158, 58, 258, 20);
getContentPane().add(comboBox);
JComboBox comboBox_1 = new JComboBox();
comboBox_1.setToolTipText("Select Project ID");
comboBox_1.setBounds(158, 103, 258, 20);
getContentPane().add(comboBox_1);
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
comboBox.addItem("Choose one...");
String query1="Select EID,ename FROM Resources";
ResultSet rs1=stat.executeQuery(query1);
while(rs1.next()){
comboBox.addItem(rs1.getString(1)+"-"+rs1.getString(2));
}
comboBox.addItem("All");
String query="SELECT pid,PNAME FROM Project";
comboBox_1.addItem("Choose one...");
ResultSet rs=stat.executeQuery(query);
while(rs.next()){
comboBox_1.addItem(rs.getString(1)+"-"+rs.getString(2));
}
comboBox_1.addItem("All");
from_date = new JTextField();
from_date.setToolTipText("Enter Start date of Employee on Project");
from_date.setHorizontalAlignment(SwingConstants.CENTER);
from_date.setBounds(158, 147, 258, 20);
getContentPane().add(from_date);
from_date.setColumns(10);
to_date = new JTextField();
to_date.setToolTipText("Enter End date of Employee on Project");
to_date.setHorizontalAlignment(SwingConstants.CENTER);
to_date.setBounds(158, 196, 258, 20);
getContentPane().add(to_date);
to_date.setColumns(10);
JButton btnNewButton = new JButton("Search");
btnNewButton.setToolTipText("Search on the basis of from date and to date");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String eid=comboBox.getSelectedItem().toString();
String pid=comboBox_1.getSelectedItem().toString();
String fd=from_date.getText();
String td=to_date.getText();

if((eid.equals("Choose one...") && pid.equals("Choose one...")) && (fd.length()==0 &&


td.length()==0)){
JOptionPane.showMessageDialog(null, "Invalid
Input");
}
else if(eid.equals("All") && pid.equals("All")){

26
String query1="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid;";
PreparedStatement pst1=(PreparedStatement)
con.prepareStatement(query1);
ResultSet rs3=pst1.executeQuery(query1);

table_2.setModel(DbUtils.resultSetToTableModel(rs3));
pst1.close();
rs3.close();
}
else if(eid=="All"){
String query="Select
EID,Ename,Designation,Department,Skillset,Contact,Email,Statr as Status from resources";
PreparedStatement pst3=(PreparedStatement)
con.prepareStatement(query);
ResultSet rs5=pst3.executeQuery(query);

table_2.setModel(DbUtils.resultSetToTableModel(rs5));
pst3.close();
rs5.close();
}
else if(pid=="All"){
String query="Select * from project;";
PreparedStatement pst3=(PreparedStatement)
con.prepareStatement(query);
ResultSet rs5=pst3.executeQuery(query);

table_2.setModel(DbUtils.resultSetToTableModel(rs5));
pst3.close();
rs5.close();
}
else if((eid!="Choose one...") && (pid!="Choose one...")&&
(fd.length()>0 && td.length()>0)){
String ss[]=pid.split("-");
String query6="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where (from_date>='"+fd+"' and to_date='"+td+"') and (resources.eid='"+eid+"'
and pname='"+ss[1]+"');";
PreparedStatement pst6=(PreparedStatement)
con.prepareStatement(query6);
ResultSet rs8=pst6.executeQuery(query6);

table_2.setModel(DbUtils.resultSetToTableModel(rs8));
pst6.close();
rs8.close();
}
else if((eid!="Choose one...") && (pid!="Choose one...")&&
(fd.length()>0)){
String ss[]=pid.split("-");
String query6="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where from_date>='"+fd+"' and (resources.eid='"+eid+"' and
pname='"+ss[1]+"');";

27
PreparedStatement pst6=(PreparedStatement)
con.prepareStatement(query6);
ResultSet rs8=pst6.executeQuery(query6);

table_2.setModel(DbUtils.resultSetToTableModel(rs8));
pst6.close();
rs8.close();
}

else if((eid!="Choose one...") && (pid!="Choose one...")&&


(td.length()>0)){
String ss[]=pid.split("-");
String query7="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where to_date<='"+td+"' and (resources.eid='"+eid+"' and pname='"+ss[1]+"');";
PreparedStatement pst7=(PreparedStatement)
con.prepareStatement(query7);
ResultSet rs9=pst7.executeQuery(query7);

table_2.setModel(DbUtils.resultSetToTableModel(rs9));
pst7.close();
rs9.close();
}
else if(eid.equals("Choose one...") && pid.equals("All")){
String query2="Select PID,Pname,psd as Start_date, ped as End_date,statp as Status from
project;";
PreparedStatement pst2=(PreparedStatement) con.prepareStatement(query2);
ResultSet rs4=pst2.executeQuery(query2);

table_2.setModel(DbUtils.resultSetToTableModel(rs4));
pst2.close();
rs4.close();
}
else if((eid!="Choose one...") && (fd.length()>0)){
String query4="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where resources.eid='"+eid+"' and from_date>='"+fd+"';";
PreparedStatement pst4=(PreparedStatement) con.prepareStatement(query4);
ResultSet rs6=pst4.executeQuery(query4);

table_2.setModel(DbUtils.resultSetToTableModel(rs6));
pst4.close();
rs6.close();
}
else if((eid!="Choose one...") && (td.length()>0)){
String query4="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where resources.eid='"+eid+"' and to_date<='"+td+"';";
PreparedStatement pst4=(PreparedStatement)
con.prepareStatement(query4);
ResultSet rs6=pst4.executeQuery(query4);

table_2.setModel(DbUtils.resultSetToTableModel(rs6));
pst4.close();

28
rs6.close();
}
else if((pid!="Choose one...") && (fd.length()>0)){
String query5="Select PID,Pname,psd as Start_date, ped as End_date,statp as Status from project where
pid='"+pid+"' and psd>='"+fd+"';";
PreparedStatement pst5=(PreparedStatement)
con.prepareStatement(query5);
ResultSet rs7=pst5.executeQuery(query5);

table_2.setModel(DbUtils.resultSetToTableModel(rs7));
pst5.close();
rs7.close();
}
else if(fd.length()>0 && td.length()>0){
String query="Select
allocation.EID,Resources.ENAME,Project.Pname,Allocation.from_date,Allocation.to_date,Allocation.hours
from ALLOCATION JOIN RESOURCES on allocation.EID=resources.Eid join project on
allocation.pid=project.pid where from_date>='"+fd+"' and to_date<='"+td+"';";
PreparedStatement pst=(PreparedStatement)
con.prepareStatement(query);
ResultSet rs=pst.executeQuery(query);

table_2.setModel(DbUtils.resultSetToTableModel(rs));
pst.close();
rs.close();
}
else if(eid=="Choose one..." && pid!="Choose one..."){
String query="Select * FROM PROJECT WHERE
PID='"+pid+"'";
PreparedStatement pst=(PreparedStatement) con.prepareStatement(query);
ResultSet rs=pst.executeQuery(query);

table_2.setModel(DbUtils.resultSetToTableModel(rs));
pst.close();
rs.close();
}
else if(eid!="Choose one..." && pid=="Choose one..."){
String query3="Select
EID,Ename,Designation,Department,Skillset,Contact,Email,Statr as Status from resources where
eid='"+eid+"';";
PreparedStatement pst3=(PreparedStatement) con.prepareStatement(query3);
ResultSet rs5=pst3.executeQuery(query3);

table_2.setModel(DbUtils.resultSetToTableModel(rs5));
pst3.close();
rs5.close();
}

else{
JOptionPane.showMessageDialog(null, "There is no entry. Please choose another search
input..");
}

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

29
}
});
btnNewButton.setBounds(102, 306, 89, 23);
getContentPane().add(btnNewButton);

JButton btnNewButton_1 = new JButton("Available");


btnNewButton_1.setToolTipText("Seach the Employee's which have free time");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String query1="Select Resources.EID,
resources.ENAME,sum(allocation.hours) as Hours from allocation join resources on
resources.eid=allocation.eid where allocation.hours<=7 group by allocation.eid;";
PreparedStatement pst1=(PreparedStatement)
con.prepareStatement(query1);
ResultSet rs1=pst1.executeQuery(query1);
table_2.setModel(DbUtils.resultSetToTableModel(rs1));
con.close();
}catch(Exception ex){
JOptionPane.showMessageDialog(null, ex);
}

}
});
btnNewButton_1.setBounds(293, 306, 89, 23);
getContentPane().add(btnNewButton_1);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 39, 21);
getContentPane().add(menuBar);
JMenu mnMenu = new JMenu("Menu");
menuBar.add(mnMenu);
JMenuItem mntmAllocationForm = new JMenuItem("Allocation Form");
mntmAllocationForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QAllocation obj1=new QAllocation();
obj1.setVisible(true);
obj1.setSize(new Dimension(500,330));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null, e1);
}

}
});
mntmAllocationForm.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { }
});

30
mnMenu.add(mntmAllocationForm);

JMenuItem mntmClientForm = new JMenuItem("Client Form");


mntmClientForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QClient obj2=new QClient();
obj2.setVisible(true);
obj2.setSize(new Dimension(500,330));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj2.setLocation(dim.width/2-
obj2.getSize().width/2, dim.height/2-obj2.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}

}
});
mnMenu.add(mntmClientForm);

JMenuItem mntmProjectForm = new JMenuItem("Project Form");


mntmProjectForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QProject obj3=new QProject();
obj3.setVisible(true);
obj3.setSize(new Dimension(500,330));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj3.setLocation(dim.width/2-obj3.getSize().width/2, dim.height/2-
obj3.getSize().height/2);
}catch(Exception e3){
JOptionPane.showMessageDialog(null, e3);
}

}
});
mnMenu.add(mntmProjectForm);
JMenuItem mntmResourcesForm = new JMenuItem("Resources Form");
mntmResourcesForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QResources obj4=new QResources();
obj4.setVisible(true);
obj4.setSize(new Dimension(500,430));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj4.setLocation(dim.width/2-obj4.getSize().width/2, dim.height/2-
obj4.getSize().height/2);
}catch(Exception e4){
JOptionPane.showMessageDialog(null, e4);
}

31
}
});
mnMenu.add(mntmResourcesForm);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(10, 379, 968, 183);
getContentPane().add(scrollPane);
table_2 = new JTable();
scrollPane.setViewportView(table_2);
JButton btnExit = new JButton("Exit");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setToolTipText("Exit the application");
btnExit.setBounds(484, 306, 89, 23);
getContentPane().add(btnExit);
}
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Dashboard obj=new Dashboard();
obj.setVisible(true);
obj.setSize(new Dimension(1000,700));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-
obj.getSize().height/2);
}
}

Allocation Form Screen


import javax.swing.JFrame;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import com.mysql.jdbc.ResultSet;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.Color;
import javax.swing.SwingConstants;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
public class QAllocation extends JFrame {
private JTextField aid;
private JTextField fd;
private JTextField td;
private JTextField noh;

32
int aid1,noh1;
String fd1,td1,pid1,eid1;
public void submit(int aid2,String pid2,String eid2,String fd2,String td2,int noh2)
{
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat1= con.createStatement();
String query3="Select eid,SUM(Hours) from allocation where eid="+eid2+" group by
eid;";
String query4="Select aid from allocation where aid='"+aid2+"'";
java.sql.ResultSet rs4=stat1.executeQuery(query4);
int no_of_hours=Integer.parseInt(noh.getText());
if(no_of_hours>8){
JOptionPane.showMessageDialog(null,"Number of hours should be less or
equal to 8");
noh.setText("");
return;
}
int f = 1;
while(rs4.next()){
if(Integer.parseInt(rs4.getString(1))==aid2){
JOptionPane.showMessageDialog(null, "The entered Alloacation ID exists. Please either change the
allocation id or check the data");
aid.setText("");
return;
}
}
java.sql.ResultSet rs3= stat1.executeQuery(query3);
while(rs3.next()){
if(Integer.parseInt(rs3.getString(2))+noh2>8){
JOptionPane.showMessageDialog(null,"number of hours
exceeded");
noh.setText("");
f =0;
}
}
if(f==1){
stat1.executeUpdate("Insert into Allocation
values("+aid2+","+pid2+","+eid2+",'"+fd2+"','"+td2+"',"+noh2+")");
JOptionPane.showMessageDialog(null, "Data submitted successfully");
}
con.close();
aid.setText("");
fd.setText("");
td.setText("");
noh.setText("");
}
catch(Exception ee)
{
//JOptionPane.showMessageDialog(null, 5);

JOptionPane.showMessageDialog(null, ee);
}
}
public QAllocation() throws ClassNotFoundException, SQLException {

33
setTitle("Allocation Form");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblAllocationId = new JLabel("Allocation Id:");
lblAllocationId.setBounds(10, 29, 83, 14);
getContentPane().add(lblAllocationId);
JLabel lblProjectId = new JLabel("Project Id:");
lblProjectId.setBounds(10, 70, 62, 14);
getContentPane().add(lblProjectId);
JLabel lblEmployeeId = new JLabel("Employee Id:");
lblEmployeeId.setBounds(10, 109, 83, 14);
getContentPane().add(lblEmployeeId);
JLabel lblFromDate = new JLabel("From Date:");
lblFromDate.setBounds(10, 141, 62, 14);
getContentPane().add(lblFromDate);
JLabel lblToDate = new JLabel("To Date:");
lblToDate.setBounds(10, 179, 46, 14);
getContentPane().add(lblToDate);
JLabel lblNumberOfHours = new JLabel("Number of Hours:");
lblNumberOfHours.setBounds(10, 204, 101, 14);
getContentPane().add(lblNumberOfHours);
JComboBox comboBox_1 = new JComboBox();
comboBox_1.setToolTipText("Select the Project ID associated with Allocation ID");
comboBox_1.setBounds(121, 67, 225, 20);
getContentPane().add(comboBox_1);
JComboBox comboBox_2 = new JComboBox();
comboBox_2.setToolTipText("Select the Employee ID associated with Allocation ID");
comboBox_2.setBounds(121, 106, 225, 20);
getContentPane().add(comboBox_2);
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String QUERY1="SELECT pid,PNAME FROM Project";
java.sql.ResultSet rs=stat.executeQuery(QUERY1);
while(rs.next()){
comboBox_1.addItem(rs.getString(1)+"-"+rs.getString(2));
}
String QUERY2="Select EID,ename,skillset FROM Resources";
java.sql.ResultSet rs1=stat.executeQuery(QUERY2);
while(rs1.next()){
comboBox_2.addItem(rs1.getString(1)+"-"+rs1.getString(2)+"-
"+rs1.getString(3));
}
JButton btnSubmit = new JButton("Insert");
btnSubmit.setToolTipText("Insert the data into database");
btnSubmit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
aid1=Integer.parseInt(aid.getText());
fd1=fd.getText();
td1=td.getText();
noh1=Integer.parseInt(noh.getText());
pid1=comboBox_1.getSelectedItem().toString();
String ss[]=pid1.split("-");
eid1=comboBox_2.getSelectedItem().toString();
String ss2[]=eid1.split("-");
try {

34
submit(aid1,ss[0],ss2[0],fd1,td1,noh1);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

}
}
);
btnSubmit.setBounds(37, 260, 89, 23);
getContentPane().add(btnSubmit);
aid = new JTextField();
aid.setHorizontalAlignment(SwingConstants.CENTER);
aid.setToolTipText("Enter the Allocation ID");
aid.setBounds(121, 26, 225, 20);
getContentPane().add(aid);
aid.setColumns(10);
fd = new JTextField();
fd.setHorizontalAlignment(SwingConstants.CENTER);
fd.setToolTipText("Enter the Starting Date of project");
fd.setBounds(121, 138, 225, 20);
getContentPane().add(fd);
fd.setColumns(10);
td = new JTextField();
td.setToolTipText("Enter till date employee's have worked on Project");
td.setHorizontalAlignment(SwingConstants.CENTER);
td.setBounds(121, 170, 225, 20);
getContentPane().add(td);
td.setColumns(10);
noh = new JTextField();
noh.setHorizontalAlignment(SwingConstants.CENTER);
noh.setToolTipText("Enter the number of hours given to the project by a Employee");
noh.setBounds(121, 201, 225, 20);
getContentPane().add(noh);
noh.setColumns(10);
JButton btnCancel = new JButton("Cancel");
btnCancel.setToolTipText("Reset the fields");
btnCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
aid.setText("");
fd.setText("");
td.setText("");
noh.setText("");
}
});
btnCancel.setBounds(163, 260, 89, 23);
getContentPane().add(btnCancel);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 39, 21);
getContentPane().add(menuBar);
JMenu mnMenu = new JMenu("Menu");
menuBar.add(mnMenu);
JMenuItem mntmDashboard = new JMenuItem("Dashboard");
mntmDashboard.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();

35
Dashboard obj1=new Dashboard();
obj1.setVisible(true);
obj1.setSize(new Dimension(1000,700));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null, e1);
}

}
});
mnMenu.add(mntmDashboard);
JMenuItem mntmClientForm = new JMenuItem("Client Form");
mntmClientForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QClient obj2=new QClient();
obj2.setVisible(true);
obj2.setSize(new Dimension(500,330));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj2.setLocation(dim.width/2-obj2.getSize().width/2, dim.height/2-
obj2.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}

}
});
mnMenu.add(mntmClientForm);
JMenuItem mntmProjectForm = new JMenuItem("Project Form");
mntmProjectForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QProject obj3=new QProject();
obj3.setVisible(true);
obj3.setSize(new Dimension(500,330));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj3.setLocation(dim.width/2-obj3.getSize().width/2, dim.height/2-
obj3.getSize().height/2);
}catch(Exception e3){
JOptionPane.showMessageDialog(null, e3);
}

}
});
mnMenu.add(mntmProjectForm);

JMenuItem mntmResourcesForm = new JMenuItem("Resources Form");


mntmResourcesForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{

36
dispose();
QResources obj4=new QResources();
obj4.setVisible(true);
obj4.setSize(new Dimension(500,430));
Dimension dim =
Toolkit.getDefaultToolkit().getScreenSize();
obj4.setLocation(dim.width/2-
obj4.getSize().width/2, dim.height/2-obj4.getSize().height/2);
}catch(Exception e4){
JOptionPane.showMessageDialog(null, e4);
}

}
});
mnMenu.add(mntmResourcesForm);
JButton btnExit = new JButton("Exit");
btnExit.setToolTipText("Exit the application");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setBounds(289, 260, 89, 23);
getContentPane().add(btnExit);

public static void main(String[] args) throws ClassNotFoundException, SQLException {


// TODO Auto-generated method stub
QAllocation obj=new QAllocation();
obj.setVisible(true);
obj.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-obj.getSize().height/2);
}
}

Project Form Screen


import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;

37
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
public class QProject extends JFrame {
private JTextField tpid;
private JTextField tpname;
private JTextField tcid;
private JTextField tsdate;
private JTextField tedate;
private JTextField tpstatus;
String pid2,cid2,psd2,ped2;
String statp,pname,psd,ped;
int pid,cid;
public void ProjectInsert(int pid1,String pname1,int cid1,String psd1,String ped1, String statp1)
throws ClassNotFoundException, SQLException{
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String query4="Select pid from project where pid='"+pid1+"'";
java.sql.ResultSet rs4=stat.executeQuery(query4);
while(rs4.next()){
if(Integer.parseInt(rs4.getString(1))==pid1){
JOptionPane.showMessageDialog(null, "The entered Project ID exists. Please either change the project id
or check the data");
tpid.setText("");
return;
}
}
stat.executeUpdate("Insert into PROJECT(pid,pname,cid,psd,ped,statp)
values("+pid+",'"+pname+"',"+cid+",'"+psd+"','"+ped+"',"+"'"+statp+"')");
JOptionPane.showMessageDialog(null, "Data entered successfully");
con.close();
tpid.setText("");
tpname.setText("");
tcid.setText("");
tsdate.setText("");
tedate.setText("");
tpstatus.setText("");
}
public void desc() throws ClassNotFoundException, SQLException{
pid2=tpid.getText();
pname=tpname.getText();
cid2=tcid.getText();
psd=tsdate.getText();
ped=tedate.getText();
statp=tpstatus.getText();
pid=Integer.parseInt(pid2);
cid=Integer.parseInt(cid2);
ProjectInsert(pid,pname,cid,psd,ped,statp);
}
public QProject() {
setTitle("Project Form");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);

38
JLabel lblProjectId = new JLabel("Project ID:");
lblProjectId.setBounds(23, 22, 71, 22);
getContentPane().add(lblProjectId);
JLabel lblProjectName = new JLabel("Project Name:");
lblProjectName.setBounds(23, 55, 81, 22);
getContentPane().add(lblProjectName);
JLabel lblClientId = new JLabel("Client ID:");
lblClientId.setBounds(23, 88, 71, 22);
getContentPane().add(lblClientId);
JLabel lblStartingDate = new JLabel("Starting Date:");
lblStartingDate.setBounds(23, 121, 81, 22);
getContentPane().add(lblStartingDate);
JLabel lblEndingDate = new JLabel("Ending Date:");
lblEndingDate.setBounds(23, 154, 71, 22);
getContentPane().add(lblEndingDate);
JLabel lblProjectStatus = new JLabel("Project Status:");
lblProjectStatus.setBounds(23, 187, 94, 22);
getContentPane().add(lblProjectStatus);
tpid = new JTextField();
tpid.setToolTipText("Enter Project ID");
tpid.setHorizontalAlignment(SwingConstants.CENTER);
tpid.setBounds(142, 23, 219, 20);
getContentPane().add(tpid);
tpid.setColumns(10);
tpname = new JTextField();
tpname.setToolTipText("Enter Project's Name");
tpname.setHorizontalAlignment(SwingConstants.CENTER);
tpname.setBounds(142, 56, 219, 20);
getContentPane().add(tpname);
tpname.setColumns(10);
tcid = new JTextField();
tcid.setToolTipText("Enter the Client ID which has given this project");
tcid.setHorizontalAlignment(SwingConstants.CENTER);
tcid.setBounds(142, 89, 219, 20);
getContentPane().add(tcid);
tcid.setColumns(10);
tsdate = new JTextField();
tsdate.setToolTipText("Enter the starting date of project");
tsdate.setHorizontalAlignment(SwingConstants.CENTER);
tsdate.setBounds(142, 122, 219, 20);
getContentPane().add(tsdate);
tsdate.setColumns(10);
tedate = new JTextField();
tedate.setToolTipText("Enter the Ending/Projected Ending Date of project");
tedate.setHorizontalAlignment(SwingConstants.CENTER);
tedate.setBounds(142, 155, 219, 20);
getContentPane().add(tedate);
tedate.setColumns(10);
tpstatus = new JTextField();
tpstatus.setToolTipText("Enter the Project's status(Active or Inactive)");
tpstatus.setHorizontalAlignment(SwingConstants.CENTER);
tpstatus.setBounds(142, 188, 219, 20);
getContentPane().add(tpstatus);
tpstatus.setColumns(10);
JButton btnInsert = new JButton("Insert");
btnInsert.setToolTipText("Insert the data into database");
btnInsert.addActionListener(new ActionListener() {

39
public void actionPerformed(ActionEvent e) {
try {
desc();
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

});
btnInsert.setBounds(27, 238, 89, 23);
getContentPane().add(btnInsert);
JButton btnCancel = new JButton("Cancel");
btnCancel.setToolTipText("Reset the fields");
btnCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
tpid.setText("");
tpname.setText("");
tcid.setText("");
tsdate.setText("");
tedate.setText("");
tpstatus.setText("");
}
});
btnCancel.setBounds(143, 238, 89, 23);
getContentPane().add(btnCancel);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 39, 21);
getContentPane().add(menuBar);
JMenu mnMenu = new JMenu("Menu");
menuBar.add(mnMenu);
JMenuItem mntmDashboard = new JMenuItem("Dashboard");
mntmDashboard.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
Dashboard obj=new Dashboard();
obj.setVisible(true);
obj.setSize(new Dimension(1000,700));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-obj.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null,e1);
}
}
});
mnMenu.add(mntmDashboard);
JMenuItem mntmAllocationForm = new JMenuItem("Allocation Form");
mntmAllocationForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QAllocation obj1=new QAllocation();

40
obj1.setVisible(true);
obj1.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}
}
});
mnMenu.add(mntmAllocationForm);
JMenuItem mntmClientF = new JMenuItem("Client Form");
mntmClientF.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QClient obj4=new QClient();
obj4.setVisible(true);
obj4.setSize(new Dimension(430,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj4.setLocation(dim.width/2-obj4.getSize().width/2, dim.height/2-
obj4.getSize().height/2);
}catch(Exception e4){
JOptionPane.showMessageDialog(null, e4);
}
}
});
mnMenu.add(mntmClientF);
JMenuItem mntmResourcesForm = new JMenuItem("Resources Form");
mntmResourcesForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QResources obj3=new QResources();
obj3.setVisible(true);
obj3.setSize(new Dimension(460,460));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj3.setLocation(dim.width/2-obj3.getSize().width/2, dim.height/2-
obj3.getSize().height/2);
}catch(Exception e3){
JOptionPane.showMessageDialog(null, e3);
}
}
});
mnMenu.add(mntmResourcesForm);
JButton btnExit = new JButton("Exit");
btnExit.setToolTipText("Exit the application");
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setBounds(259, 238, 89, 23);
getContentPane().add(btnExit);
}
public static void main(String[] args) {
// TODO Auto-generated method stub

41
QProject o=new QProject();
o.setVisible(true);
o.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
o.setLocation(dim.width/2-o.getSize().width/2, dim.height/2-o.getSize().height/2);
}
}

Client Form Screen


import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.SystemColor;
import java.awt.Toolkit;
import java.awt.Color;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
public class QClient extends JFrame {
private JTextField cname;
private JTextField cid;
private JTextField cstatus;
String cname1,statc,cid1;
int cid2;
public void insert(int cid3,String statc1,String cname2) throws SQLException, ClassNotFoundException{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String query4="Select cid from clie where cid='"+cid3+"'";
java.sql.ResultSet rs4=stat.executeQuery(query4);
while(rs4.next()){
if(Integer.parseInt(rs4.getString(1))==cid3){
JOptionPane.showMessageDialog(null, "The entered Client ID exists. Please either
change the Client id or check the data");
cid.setText("");
return;
}
}
stat.executeUpdate("Insert into clie(cid,cname,statc)
values("+cid3+",'"+cname2+"','"+statc1+"'"+")");

42
JOptionPane.showMessageDialog(null, "Data entered successfully");

con.close();
cname.setText("");
cid.setText("");
cstatus.setText("");
}

public QClient() {
setTitle("Client Form");
setForeground(new Color(255, 255, 255));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel lblClientId = new JLabel("Client ID:");
lblClientId.setBounds(21, 77, 60, 23);
lblClientId.setBackground(new Color(255, 255, 255));
JLabel lblNewLabel = new JLabel("Client Name:");
lblNewLabel.setBounds(21, 111, 79, 23);
JLabel lblClientStatus = new JLabel("Client Status:");
lblClientStatus.setBounds(21, 145, 79, 23);
cname = new JTextField();
cname.setBounds(110, 112, 229, 20);
cname.setToolTipText("Enter Client's Name\r\n");
cname.setHorizontalAlignment(SwingConstants.CENTER);
cname.setColumns(10);
cid = new JTextField();
cid.setBounds(110, 78, 229, 20);
cid.setToolTipText("Enter Client ID");
cid.setHorizontalAlignment(SwingConstants.CENTER);
cid.setColumns(10);
cstatus = new JTextField();
cstatus.setBounds(110, 146, 229, 20);
cstatus.setToolTipText("Enter the status of Client(Active or Inactive)");
cstatus.setHorizontalAlignment(SwingConstants.CENTER);
cstatus.setColumns(10);
JButton btnInsert = new JButton("Insert");
btnInsert.setToolTipText("Insert the data into database");
btnInsert.setBounds(45, 214, 89, 23);
btnInsert.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
cid1=cid.getText();
cname1=cname.getText();
statc=cstatus.getText();
cid2=Integer.parseInt(cid1);
try {
insert(cid2,statc,cname1);
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});

JButton btnCancel = new JButton("Cancel");

43
btnCancel.setToolTipText("Reset the fields");
btnCancel.setBounds(179, 214, 89, 23);
btnCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
cname.setText("");
cid.setText("");
cstatus.setText("");
}
});
getContentPane().setLayout(null);
getContentPane().add(lblClientId);
getContentPane().add(cid);
getContentPane().add(lblNewLabel);
getContentPane().add(cname);
getContentPane().add(lblClientStatus);
getContentPane().add(cstatus);
getContentPane().add(btnInsert);
getContentPane().add(btnCancel);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 39, 21);
getContentPane().add(menuBar);
JMenu mnMenu = new JMenu("Menu");
menuBar.add(mnMenu);
JMenuItem mntmDashboard = new JMenuItem("Dashboard");
mntmDashboard.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
Dashboard obj=new Dashboard();
obj.setVisible(true);
obj.setSize(new Dimension(1000,700));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-
obj.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null,e1);
}
}
});
mnMenu.add(mntmDashboard);
JMenuItem mntmAllocationForm = new JMenuItem("Allocation Form");
mntmAllocationForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QAllocation obj1=new QAllocation();
obj1.setVisible(true);
obj1.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}
}
});
mnMenu.add(mntmAllocationForm);

44
JMenuItem mntmProjectForm = new JMenuItem("Project Form");
mntmProjectForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QProject obj5=new QProject();
obj5.setVisible(true);
obj5.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj5.setLocation(dim.width/2-obj5.getSize().width/2,
dim.height/2-obj5.getSize().height/2);
}catch(Exception e5){
JOptionPane.showMessageDialog(null, e5);
}
}
});
mnMenu.add(mntmProjectForm);

JMenuItem mntmRsourcesForm = new JMenuItem("Resources Form");


mntmRsourcesForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QResources obj3=new QResources();
obj3.setVisible(true);
obj3.setSize(new Dimension(460,460));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj3.setLocation(dim.width/2-obj3.getSize().width/2, dim.height/2-
obj3.getSize().height/2);
}catch(Exception e3){
JOptionPane.showMessageDialog(null, e3);
}
}
});
mnMenu.add(mntmRsourcesForm);

JButton btnExit = new JButton("Exit");


btnExit.setToolTipText("Exit the application");
btnExit.setBounds(313, 214, 89, 23);
getContentPane().add(btnExit);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
QClient o=new QClient();
o.setVisible(true);
o.setSize(new Dimension(430,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
o.setLocation(dim.width/2-o.getSize().width/2, dim.height/2-o.getSize().height/2);
}

45
Resources Form Screen
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.Color;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
public class QResources extends JFrame {
private JTextField eid;
private JTextField ename;
private JTextField dob;
private JTextField doj;
private JTextField designation;
private JTextField dept;
private JTextField country;
private JTextField email;
private JTextField cnumber;
private JTextField rstatus;
private JTextField Skillsettxt;
public void insert(int eid2, String ename2, String dob2, String doj2, String designation2, String
dept2, String country2,String email2,String cnumber2, String rstatus2,String skill2) throws
ClassNotFoundException, SQLException{
Class.forName("com.mysql.jdbc.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/queue","root","root");
Statement stat= con.createStatement();
String query4="Select eid from resources where eid='"+eid2+"'";
java.sql.ResultSet rs4=stat.executeQuery(query4);
int f = 1;
while(rs4.next()){
if(Integer.parseInt(rs4.getString(1))==eid2){
JOptionPane.showMessageDialog(null, "The entered Employee ID exists. Please
either change the Employee id or check the data");
eid.setText("");
return;
}
}
stat.executeUpdate("Insert into resources
values("+eid2+",'"+ename2+"','"+dob2+"','"+doj2+"','"+designation2+"','"+dept2+"','"+country2+"','"+email
2+"','"+cnumber2+"','"+rstatus2+"','"+skill2+"')");
JOptionPane.showMessageDialog(null, "Data entered successfully");
con.close();

46
eid.setText("");
ename.setText("");
dob.setText("");
doj.setText("");
designation.setText("");
dept.setText("");
country.setText("");
email.setText("");
cnumber.setText("");
rstatus.setText("");
Skillsettxt.setText("");
}
public QResources() {
setTitle("Resources Form");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblEmployeeId = new JLabel("Employee ID:");
lblEmployeeId.setBounds(10, 33, 72, 14);
getContentPane().add(lblEmployeeId);
JLabel lblEmployeeName = new JLabel("Employee Name:");
lblEmployeeName.setBounds(10, 58, 100, 14);
getContentPane().add(lblEmployeeName);
JLabel lblDateOfBirth = new JLabel("Date of Birth:");
lblDateOfBirth.setBounds(10, 83, 100, 14);
getContentPane().add(lblDateOfBirth);
JLabel lblDateOfJoining = new JLabel("Date of Joining:");
lblDateOfJoining.setBounds(10, 108, 100, 14);
getContentPane().add(lblDateOfJoining);
JLabel lblDesignation = new JLabel("Designation:");
lblDesignation.setBounds(10, 133, 72, 14);
getContentPane().add(lblDesignation);
JLabel lblDepartment = new JLabel("Department:");
lblDepartment.setBounds(10, 191, 72, 14);
getContentPane().add(lblDepartment);
JLabel lblCountry = new JLabel("Country:");
lblCountry.setBounds(10, 216, 72, 14);
getContentPane().add(lblCountry);
JLabel lblEmailId = new JLabel("Email ID:");
lblEmailId.setBounds(10, 241, 58, 14);
getContentPane().add(lblEmailId);
JLabel lblContactNumber = new JLabel("Contact Number:");
lblContactNumber.setBounds(10, 266, 100, 14);
getContentPane().add(lblContactNumber);
JLabel lblResourceStatus = new JLabel("Resource Status:");
lblResourceStatus.setBounds(10, 291, 100, 14);
getContentPane().add(lblResourceStatus);
JButton btnInsert = new JButton("Insert");
btnInsert.setToolTipText("Insert the data in database");
btnInsert.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int eid1=Integer.parseInt(eid.getText());
String ename1=ename.getText();
String dob1=dob.getText();
String doj1=doj.getText();
String designation1=designation.getText();
String dept1=dept.getText();
String country1=country.getText();

47
String email1=email.getText();
String cnumber1=cnumber.getText();
String rstatus1=rstatus.getText();
String skill1=Skillsettxt.getText();
try {

insert(eid1,ename1,dob1,doj1,designation1,dept1,country1,email1,cnumber1,rstatus1,skill1);
} catch (ClassNotFoundException | SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
btnInsert.setBounds(32, 319, 89, 23);
getContentPane().add(btnInsert);
JButton btnCancel = new JButton("Cancel");
btnCancel.setToolTipText("Reset each field");
btnCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
eid.setText("");
ename.setText("");
dob.setText("");
doj.getText();
designation.setText("");
dept.setText("");
country.setText("");
email.setText("");
cnumber.setText("");
rstatus.setText("");
Skillsettxt.setText("");
}
});
btnCancel.setBounds(153, 319, 89, 23);
getContentPane().add(btnCancel);

eid = new JTextField();


eid.setToolTipText("Enter Employee ID");
eid.setHorizontalAlignment(SwingConstants.CENTER);
eid.setBounds(105, 30, 263, 20);
getContentPane().add(eid);
eid.setColumns(10);

ename = new JTextField();


ename.setToolTipText("Enter Employee's Name\r\n");
ename.setHorizontalAlignment(SwingConstants.CENTER);
ename.setBounds(105, 55, 263, 20);
getContentPane().add(ename);
ename.setColumns(10);
dob = new JTextField();
dob.setToolTipText("Enter Employee's Date of Birth");
dob.setHorizontalAlignment(SwingConstants.CENTER);
dob.setBounds(105, 80, 263, 20);
getContentPane().add(dob);
dob.setColumns(10);
doj = new JTextField();
doj.setToolTipText("Enter Employee's Date of Joining");
doj.setHorizontalAlignment(SwingConstants.CENTER);

48
doj.setBounds(105, 105, 263, 20);
getContentPane().add(doj);
doj.setColumns(10);
designation = new JTextField();
designation.setToolTipText("Enter the role of Employee in the company");
designation.setHorizontalAlignment(SwingConstants.CENTER);
designation.setBounds(105, 130, 263, 20);
getContentPane().add(designation);
designation.setColumns(10);
dept = new JTextField();
dept.setToolTipText("Enter the department of Employee");
dept.setHorizontalAlignment(SwingConstants.CENTER);
dept.setBounds(105, 188, 263, 20);
getContentPane().add(dept);
dept.setColumns(10);
country = new JTextField();
country.setToolTipText("Enter the Employee's birth country");
country.setHorizontalAlignment(SwingConstants.CENTER);
country.setBounds(105, 213, 263, 20);
getContentPane().add(country);
country.setColumns(10);
email = new JTextField();
email.setToolTipText("Enter the Employee's E-mail ID");
email.setHorizontalAlignment(SwingConstants.CENTER);
email.setBounds(105, 238, 263, 20);
getContentPane().add(email);
email.setColumns(10);
cnumber = new JTextField();
cnumber.setToolTipText("Enter the Employee's mobile number");
cnumber.setHorizontalAlignment(SwingConstants.CENTER);
cnumber.setBounds(105, 263, 263, 20);
getContentPane().add(cnumber);
cnumber.setColumns(10);
rstatus = new JTextField();
rstatus.setToolTipText("Enter the Employee's status(Active or Inactive)");
rstatus.setHorizontalAlignment(SwingConstants.CENTER);
rstatus.setBounds(105, 288, 263, 20);
getContentPane().add(rstatus);
rstatus.setColumns(10);
JMenuBar menuBar = new JMenuBar();
menuBar.setBounds(0, 0, 39, 25);
getContentPane().add(menuBar);
JMenu mnMenu = new JMenu("Menu");
menuBar.add(mnMenu);
JMenuItem mntmDashboard = new JMenuItem("Dashboard");
mntmDashboard.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
Dashboard obj=new Dashboard();
obj.setVisible(true);
obj.setSize(new Dimension(1000,700));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj.setLocation(dim.width/2-obj.getSize().width/2, dim.height/2-
obj.getSize().height/2);
}catch(Exception e1){
JOptionPane.showMessageDialog(null,e1);

49
}
}
});
mnMenu.add(mntmDashboard);
JMenuItem mntmAllocationForm = new JMenuItem("Allocation Form");
mntmAllocationForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QAllocation obj1=new QAllocation();
obj1.setVisible(true);
obj1.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj1.setLocation(dim.width/2-obj1.getSize().width/2, dim.height/2-
obj1.getSize().height/2);
}catch(Exception e2){
JOptionPane.showMessageDialog(null, e2);
}
}
});
mnMenu.add(mntmAllocationForm);
JMenuItem mntmClientForm = new JMenuItem("Client Form");
mntmClientForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QClient obj4=new QClient();
obj4.setVisible(true);
obj4.setSize(new Dimension(430,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj4.setLocation(dim.width/2-obj4.getSize().width/2, dim.height/2-
obj4.getSize().height/2);
}catch(Exception e4){
JOptionPane.showMessageDialog(null, e4);
}
}
});
mnMenu.add(mntmClientForm);
JMenuItem mntmProjectForm = new JMenuItem("Project Form");
mntmProjectForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
dispose();
QProject obj5=new QProject();
obj5.setVisible(true);
obj5.setSize(new Dimension(500,330));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
obj5.setLocation(dim.width/2-obj5.getSize().width/2, dim.height/2-
obj5.getSize().height/2);
}catch(Exception e5){
JOptionPane.showMessageDialog(null, e5);
}
}
});
mnMenu.add(mntmProjectForm);
JButton btnExit = new JButton("Exit");
btnExit.setToolTipText("Exit the application");

50
btnExit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
});
btnExit.setBounds(279, 319, 89, 23);
getContentPane().add(btnExit);
JLabel lblSkillset = new JLabel("Skillset:");
lblSkillset.setBounds(10, 158, 58, 23);
getContentPane().add(lblSkillset);
Skillsettxt = new JTextField();
Skillsettxt.setToolTipText("Enter the skillset of the employee");
Skillsettxt.setHorizontalAlignment(SwingConstants.CENTER);
Skillsettxt.setBounds(105, 157, 263, 20);
getContentPane().add(Skillsettxt);
Skillsettxt.setColumns(10);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
QResources oo=new QResources();
oo.setVisible(true);
oo.setSize(new Dimension(460,460));
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
oo.setLocation(dim.width/2-oo.getSize().width/2, dim.height/2-oo.getSize().height/2);
}
}

Database creation
create database QUEUE

use QUEUE

CREATE TABLE PROJECT

PID INT PRIMARY KEY,

PNAME VARCHAR(100),

CID INT REFERENCES CLIE(CID) ,

PSD DATE,

PED DATE,

STATP VARCHAR(100)

);

CREATE TABLE CLIE

CID INT PRIMARY KEY,

51
CNAME VARCHAR(100),

STATC VARCHAR(100)

);

CREATE TABLE RESOURCES

EID INT PRIMARY KEY,

ENAME VARCHAR(100),

DOB DATE,

DOJ DATE,

DESIGNATION VARCHAR(100),

DEPARTMENT VARCHAR(100),

COUNTRY VARCHAR(100),

EMAIL VARCHAR(100),

CONTACT VARCHAR(100),

STATR VARCHAR(100)

);

Create Table Allocation

AID INT PRIMARY KEY,

PID INT REFERENCES PROJECT(PID),

EID INT REFERENCES RESOURCES(EID),

FROM_DATE DATE,

TO_DATE DATE,

HOURS INT,

Skillset varchar(100)

);

Create Table Login

Username VARCHAR(100),

Password VARCHAR(100)

);

52
DATABASE TABLES
Login Table

Project Table

Client Project

53
Resources Table

Allocation Table

54
SCREEN

Login Form

Log into the Project Resource Allocator

55
Menu
After entering the right Username and Password, he/she will be
directed to the Menu

56
Dashboard

View Dashboard to search a particular project or resources

57
Allocation Form

View Allocation Form which is used to assign resources to particular


projects based on skillset

58
Project Form
View Project Form which is used to insert new projects

59
Client Form

View Client Form which is used to insert new Clients

60
Resources Form
View Resources Form which is used to insert employees

61
TESTING

62
TESTING PHASE

The completion of a system is achieved only after it has been thoroughly tested.
Though this gives a feel the project is completed, there cannot be any project
without going though this stage. Hence in this stage it is decided whether the
project can under go the real time environment execution without any break
downs, therefore a package can be rejected even at this stage.

SYSTEM TESTING
Testing is a set of activities that can be planned in advance and conducted
systematically. The proposed system is tested in parallel with the software that
consists of its own phases of analysis, implementation, testing and maintenance.
Following are the tests conducted on the system.

UNIT TESTING
During the implementation of the system each module of the system was tested
separately to uncover errors with in its boundaries. User interface was used as a
guide in the process.

MODULE TESTING
A module is composed of various programs related to that module. Module testing
is done to check the module functionality and interaction between units within a
module.

It checks the functionality of each program with relation to other programs within
the same module. It then tests the overall functionality of each module.

INTEGRATION TESTING
Integration testing is a systematic technique for constructing the program
structure while conducting tests to uncover errors associated with interfacing. The

63
objective is to take unit-tested module and build a program structure that has been
dictated by design.

ACCEPTANCE TESTING
The software has been tested with the realistic data given by the client and
produced fruitful results. The client satisfying all the requirements specified by
them has also developed the software within the time limitation specified. A
demonstration has been given to the client and the end-user giving all the
operational features.

64
IMPLEMENTATION

65
IMPLEMENTATION PHASE

The implementation is the final and important phase. It involves User training,
system testing and successful running of the developed system. The users test the
developed system when changes are made according to the needs. The testing
phase involves the testing of the developed system using various kinds of data. An
elaborate testing of data is prepared and system is tested using the tests data.

Implementation is the stage where theoretical design turned into a working


system. Implementation is planed carefully to propose system to avoid
unanticipated problems. Many preparations involved before and during the
implementation of proposed system. The system needed to be plugged in to the
organizations network then it could be accessed from anywhere, after a user logins
into the portal. The tasks that had to be done to implement the system were to
create the database tables in the organization database domain. Then the
administrator was granted his role so that the system could be accessed.

The next phase in the implementation was to educate the system. A demonstration
of all the functions that can be carried out by the system was given to examination
department person, who will make extensive use of the system.

66
CONCLUSION

67
CONCLUSION

By the implementation of the Project Resource Allocator, the Project resource team
has not only been able to get the right match at click of a button but it has also
facilitated the optimum utilization of the existing manpower resources. In the beta
testing stages, the team has been able to demonstrate the time saved to complete
the entire transaction by a significant level. Moreover, it also gives the necessary
match of the project resource required for a particular project by skill set matching.
In fact, there have been requirements to use the same software to derive the
training calendar for the resources in order to keep the entire team updated on the
emerging trends and technologies.

68
BIBLIOGRAPHY

69
BIBLIOGRAPHY

BOOKS REFERRED
The following books were used extensively for the project development and
implementation.

Let Us JAVA BPB Publications. By Yashavant Kanetkar.

Programming with JAVA A Primer Tata McGraw-Hill Publishing Company


Limited. By E. Balagurusamy

WEBSITES REFERRED
The following links were searched and exploited extensively for the project
development and implementation.

http://www.oracle.com/technetwork/java/javase/documentation
http://www.javatpoint.com
http://www.javatonovice.com
http://www.tutorialspoint.com/java
http://www.tutorialspoint.com/mysql
https://www.mysql.com
https://www.sololearn.com
https://www.stackoverflow.com

70

Vous aimerez peut-être aussi