Ip Project
Ip Project
INFORMATICS
PRACTICES(IP)
PROJECT
ROLL NO: 42
ARMY PUBLIC
SCHOOL , JALANDHAR
CANTT.
Certificate
This is to certify that SAGAR KUMAR, a student
of class XII-D has successfully completed the
project entitled EMPLOYEE MANAGEMENT
SYSTEM under the guidance of MR. GAGAN
CHADHA (PGT, Computer Science) during the
year 2017-18 in partial fulfillment of CBSE
AISSCE Examination 2018 conducted by CBSE,
New Delhi. This report or a similar report on the
topic has not been submitted for any other
examination and does not form a part of any
other course undergone by the candidate.
Last, but not the least, I would like to thank CBSE for
giving us the opportunity to undertake this project.
INDEX
1. CERTIFICATE
2. ACKNOWLEDGEMENT
3. TITLE OF PROJECT
4. INTRODUCTION
5. SYSTEM IMPLEMENTATION
6. DATABASE DESIGN
7. SOURCE CODE
8. DESIGN AND OUTPUT
9. USER MANUAL
10. BIBLIOGRAPHY
TITLE OF PROJECT
EMPLOYEE
MANAGEMENT SYSTEM
INTRODUCTION
This software project is developed to automate the functionalities
of a School. The purpose of the software project is to develop the
Management Information System (MIS) to automate the record of
the students with a view to enhance the decision making of the
functionaries.
This software, being simple in design and working, does not require
much of training to users, and can be used as a powerful tool for
automating a school System.
jToggleButton2ActionPerformed(java.awt.event.ActionEvent evt) {
String password=jPasswordField1.getText();
String Username=jTextField1.getText();
if(password.contains("1234")&& Username.contains("apsjrc")){
jTextField1.setText("");
jPasswordField1.setText("");
close();
}else{
JOptionPane.showMessageDialog(null, "Incorrect Password\nClick or
Try again.2","Worng Password",JOptionPane.ERROR_MESSAGE);
jPasswordField1.setText("");
jTextField1.setText("");
}
Coading for Enter button:
jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
3. FORM: MAIN PAGE
try{
Class.forName("java.sql.DriverManager");
Connection con =
(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/dbms",
"root", "1234");
Statement stmt = (Statement) con.createStatement();
stmt.executeUpdate("INSERT INTO emp VALUES
('"+empno+"','"+empname+"','"+address+"','"+salary+"','"+Age+"','"+Phoneno+"',
'"+gender+"');");
JOptionPane.showMessageDialog(this,"Recrod Saved");
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextArea1.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField4.setText("");
}
catch( HeadlessException | ClassNotFoundException | SQLException e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
5. FORM: SEARCH RECORD
}
else
JOptionPane.showMessageDialog(this,"Recrod not found");
}
catch( HeadlessException | ClassNotFoundException | SQLException e)
JOptionPane.showMessageDialog(this,e.getMessage());
try{
Class.forName("java.sql.DriverManager");
Connection con =
(Connection)DriverManager.getConnection("jdbc:mysql://localhost:330
6/dbms","root", "1234");
Statement stmt = (Statement) con.createStatement();
stmt.executeUpdate("update emp set
EmpNo="+empno+","+"EmpName='"+empname+"' ,"+"address='"+add
ress+"',"+"salary='"+salary+"',"+"Age='"+Age+"',"+"Phoneno='"+Phonen
o+"',"+"gender='"+gender+"';");
}
catch(ClassNotFoundException | SQLException e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
JOptionPane.showMessageDialog(this,"Record Updated");
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextArea1.setText("");
}
else
JOptionPane.showMessageDialog(this,"Record not found");
}
catch(HeadlessException | ClassNotFoundException |
SQLException e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
catch(ClassNotFoundException | SQLException e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
JOptionPane.showMessageDialog(this,"Record Updated");
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextArea1.setText("");
5. FORM: DELETE RECORD
String eno,Eid,Ename;
eno=JOptionPane.showInputDialog("Enter Emp no:");
try{
Class.forName("java.sql.DriverManager");
Connection con =
(Connection)DriverManager.getConnection("jdbc:mysql://localhost:
3306/dbms","root", "1234");
Statement stmt = (Statement) con.createStatement();
ResultSet rs = stmt.executeQuery("Select * from emp where
Empno="+eno+";");
if(rs.next())
{
Eid=rs.getString("EmpNo");
Ename=rs.getString("EmpName");
jTextField1.setText(Eid);
jTextField2.setText(Ename);
}
else
JOptionPane.showMessageDialog(this,"Recrod not found");
}
catch(HeadlessException | ClassNotFoundException |
SQLException e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
Coading For Delete Button:
String Eid,Ename;
Eid=JOptionPane.showInputDialog("Enter Emp no whose record do you
want to delete:");
int found=1;
try{
Class.forName("java.sql.DriverManager");
Connection con =
(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/db
ms","root", "1234");
Statement stmt = (Statement) con.createStatement();
ResultSet rs = stmt.executeQuery("Select * from emp where
Empno="+Eid+";");
if(rs.next())
{
found=JOptionPane.showConfirmDialog(this,"Are you sure");
if(found==0)
{
stmt.executeUpdate("delete from emp where EmpNo="+Eid+";");
JOptionPane.showMessageDialog(this,"Record Deleted");
}
}
else
JOptionPane.showMessageDialog(this,"Recrod not found");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
jTextField1.setText("");
jTextField2.setText("");
BIBLIOGRAPHY