You are on page 1of 36

ONLINE APPRAISAL

MANAGEMENT

GROUP MEMBERS:
SUMIT KAR, SVIST, 122410110055
RUKHSAR AZIZ, SVIST, 122410110039
SOHAM PURKAIT, SVIST, 122410110128
SWAGATA BANERJEE, SVIST, 122410110058
SAYANDEEP MAJUMDAR, SVIST, 122410110044

Table of Contents
Acknowledgement ....................................................................................................................................... 3
Project Objective.......................................................................................................................................... 4
Project Scope................................................................................................................................................ 6
Application Workflow .................................................................................................................................. 7
Database Design .......................................................................................................................................... 8
Coding........................................................................................................................................................... 9
Requirement Specifications ....................................................................................................................... 30
Future Scope of Improvement .................................................................................................................. 31
Certificates ................................................................................................................................................. 32

Acknowledgement
We take this opportunity to express our profound gratitude and
deep regards to our faculty Mr. Sudipto Kr. Mukherjee and
guide Mr. Kaushik Ghosh for their exemplary guidance,
monitoring and constant encouragement throughout the course
of this project. The blessing, help and guidance given by them
time to time shall carry us a long way in the journey of life on
which we are about to embark.

Project Objective
A performance appraisal (PA) is also referred to as a performance review,
performance evaluation, and career development discussion. Employee appraisal is
a method by which the job performance of an employee is documented and
evaluated. Performance appraisals are a part of career development and consist of
regular reviews of employee performance within organizations.
Human resource management (HRM) conducts performance
management. Performance management systems consist of the activities and/or
processes embraced by an organization in anticipation of improving employee
performance, and therefore, organizational performance. Consequently,
performance management is conducted at the organizational level and the
individual level. At the organizational level, performance management oversees
organizational performance and compares present performance with organizational
performance goals. The achievement of these organizational performance goals
depends on the performance of the individual organizational members. Therefore,
measuring individual employee performance can prove to be a valuable
performance management process for the purposes of HRM and for the
organization. Performance appraisal is one of the most important processes in
Human Resource Management to consider the following things in a business
organization:
1) Promotion: Performance Appraisal helps the supervisors to chalk out the
promotion programs for efficient employees. In this regards, inefficient workers
can be dismissed or demoted in case.
2) Compensation: Performance Appraisal helps in chalking out compensation
packages for employees. Merit rating is possible through performance appraisal.
Performance Appraisal tries to give worth to a performance. Compensation
packages, which include bonus, high salary rates, extra benefits, allowances and
pre-requisites, are dependent on performance appraisal. The criteria should be
merit rather than seniority.
3) Employees Development: The systematic procedure of performance appraisal
helps the supervisors to frame training policies and programs. It helps to analyze
strengths and weaknesses of employees so that new jobs can be designed for
efficient employees. It also helps in framing future development programs.

4) Selection Validation: Performance Appraisal helps the supervisors to


understand the validity and importance of the selection procedure. The supervisors
come to know the validity and thereby the strengths and weaknesses of selection
procedure. Future changes in selection methods can be made in this regard.
5) Communication: For an organization, effective communication between
employees and employers is very important. Through performance appraisal,
communication can be sought for in the following ways:
(a) Through performance appraisal, the employers can understand and accept skills
of subordinates.
(b) The subordinates can also understand and create a trust and confidence in
superiors.
(c) It also helps in maintaining cordial and congenial labor management
relationship.
(d) It develops the spirit of work and boosts the morale of employees.
6) Motivation: Performance appraisal serves as a motivation tool. Through
evaluating performance of employees, a person's efficiency can be determined if
the targets are achieved. This very well motivates a person for better job and helps
him to improve his performance in the future

Project Scope
The performance management process begins with leadership within the
organization creating a performance management policy. Primarily, management
governs performance by influencing employee performance input (e.g. training
programs) and by providing feedback via output (i.e. performance assessment and
appraisal). "The ultimate objective of a performance management process is to
align individual performance with organizational performance". A very common
and central process of performance management systems is performance appraisal
(PA). The PA process should be able to inform employees about the
"organization's goals, priorities, and expectations and how well they are
contributing to them".

Application Work Flow


There will be a HOME page. The page will have introduction about the
work and all the LOGIN information.
There will be four login pages:
ADMIN: This is the login page of the user who is allowed to create, update and
change the criteria. (LINK TO THIS PAGE WILL NOT BE SHOWN IN THE
HOME PAGE).
EMPLOYEE: This is the page where Employee can rate them on their own
performance. When logged in using this page the person can only rate
himself/herself and see the ratings given to him/her by the department HOD.
HOD: He is allowed to open the forms of employees in his department and grade
him/her. He can also add comments if required.
HRM: This is the login page of the user who is allowed to verify the employee
forms with respect of their departments and announce their hikes.
The form is first given to each and every logged in Employee. Employee
can rate themselves. If opened with Employee Login there will be no access to the
column of HOD RATING and COMMENTS. She/he can only have those in ReadOnly mode.
This form when opened with HOD login gives access only to the HOD
RATING and COMMENTS. As the HOD puts his ratings, average of the rating
will be calculated. HOD will never get access to the SELF RATING.
There will be a HRM login page. According to the Average Rating the hike
in Salary is decided by the HRM and shown to the Employee.
The rating should be done on a scale of 1-5 on the parameters.
Rating Grade
5

Superior

High

3
2
1

Good
Marginal
Low

Comment
Crosses Performance
Standard Consistently
Crosses Performance
Standard Sometimes
Meets Performance Standard Consistently
Meets Performance Standard Sometimes
Does not Meet Performance Standard

Database Design
Employee Table

Rating Table

Parameter Table

Coding
Home Page (Default.aspx)

Code for Master Page (DefaultMasterPage.master.cs):


using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Configuration;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class DefaultMasterPage : System.Web.UI.MasterPage


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLoginEmp_Click(object sender, EventArgs e)
{
emp.Visible = true;
hrm.Visible = false;
hod.Visible = false;
}
protected void btnLoginHOD_Click(object sender, EventArgs e)
{
emp.Visible = false;
hrm.Visible = false;
hod.Visible = true;
}

protected void btnLoginHRM_Click(object sender, EventArgs e)


{
hrm.Visible = true;
emp.Visible = false;
hod.Visible = false;
}
protected void btnEMPlogin_Click(object sender, EventArgs e)
{
HttpCookie c = new HttpCookie("USERS");
if (c["USERS"] == null)
{
c["empID"] = "";
c["empPASS"] = "";
}
SqlConnection con = new SqlConnection(conSettings.conStr);
con.Open();
string Uname = tbUnameEMP.Text;
string password = tbPassEMP.Text;
string query = String.Format("SELECT * FROM [dbo].[EmployeeTable]
where empID = '{0}' AND empStatus ='EMP'", Uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();
if (r.Read())
{
if (r["empPASS"].ToString() == password)
{
c["empId"] = Uname;
c["empPASS"] = password;
Response.Cookies.Add(c);
Response.Redirect("~\\employee\\Default.aspx");
}
else
{
Response.Write("<script>alert('Login
Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
}
else
{
Response.Write("<script>alert('Login Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
r.Close();
con.Close();
}
protected void btnHODlogin_Click(object sender, EventArgs e)
{
HttpCookie c = new HttpCookie("USERS");

if (c["USERS"] == null)
{
c["empID"] = "";
c["empPASS"] = "";
}
SqlConnection con = new SqlConnection(conSettings.conStr);
con.Open();
string Uname = tbUnameHOD.Text;
string password = tbPassHOD.Text;
string query = String.Format("SELECT * FROM [dbo].[EmployeeTable]
where empID = '{0}' AND empStatus ='HOD'", Uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();
if (r.Read())
{
if (r["empPASS"].ToString() == password)
{
c["empId"] = Uname;
c["empPASS"] = password;
Response.Cookies.Add(c);
Response.Redirect("~\\hod\\Default.aspx");
}
else
{
Response.Write("<script>alert('Login
Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
}
else
{
Response.Write("<script>alert('Login Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
r.Close();
con.Close();
}
protected void btnHRMlogin_Click(object sender, EventArgs e)
{
HttpCookie c = new HttpCookie("USERS");
if (c["USERS"] == null)
{
c["empID"] = "";
c["empPASS"] = "";
}
SqlConnection con = new SqlConnection(conSettings.conStr);
con.Open();
string Uname = tbUnameHRM.Text;
string password = tbPassHRM.Text;
string query = String.Format("SELECT * FROM [dbo].[EmployeeTable]
where empID = '{0}' AND empStatus ='HRM'", Uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();
if (r.Read())
{
if (r["empPASS"].ToString() == password)
{

c["empId"] = Uname;
c["empPASS"] = password;
Response.Cookies.Add(c);
Response.Redirect("~\\hrm\\Default.aspx");
}
else
{
Response.Write("<script>alert('Login
Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
}
else
{
Response.Write("<script>alert('Login Unsuccessfull')</script>");
tbPassEMP.Text = "";
tbUnameEMP.Text = "";
}
r.Close();
con.Close();
}
}

Employee Page (employee/Default.aspx)

Coding for Employee Page (employee/Default.aspx.cs):


using
using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Data;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.Configuration;

public partial class employee_Default : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(conSettings.conStr);
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack == false)
{
HttpCookie c = Request.Cookies["USERS"];
if (c == null)
Response.Redirect("..\\Default.aspx");
else
{
con.Open();
string uname = c["empID"].ToString();
string password = c["empPASS"].ToString();
string query = String.Format("Select * from
[dbo].[EmployeeTable] where empId= '{0}'",uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();

r.Read();
if (r["empPASS"].ToString() == password)
{
lblLogin.Text="Welcome
"+r["empName"].ToString()+"("+r["empId"].ToString()+")";
string isFilled="true";
if (r["isFilled"].ToString() == isFilled)
{
btnRating.Enabled = false;
}
else
{
btnViewing.Enabled = false;
}
}
else
lblLogin.Text = "Please Login Again";
}
}
}
protected void btnLogout_Click(object sender, EventArgs e)
{
HttpCookie c = Request.Cookies["USERS"];
c.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(c);
Response.Redirect("..\\Default.aspx");
}
protected void btnRating_Click(object sender, EventArgs e)
{
PanelView.Visible = false;
panelRate.Visible = true;
DataTable dt = new DataTable();
dt.Columns.Add("ParameterID");
dt.Columns.Add("Parameter");
Session["dt"] = dt;
SqlDataAdapter da = new SqlDataAdapter("select parameterId, parameter
from dataTable", con);
DataSet ds = new DataSet();
da.Fill(ds, "dataTable");
DataTable dt1 = ds.Tables[0];
foreach (DataRow dr in dt1.Rows)
{
DataRow dr1 = ((DataTable)Session["dt"]).NewRow();
dr1[0] = dr[0].ToString();
dr1[1] = dr[1].ToString();
((DataTable)Session["dt"]).Rows.Add(dr1);
}
GridView1.DataSource = (DataTable)Session["dt"];
GridView1.DataBind();
}
protected void btnVerify_Click(object sender, EventArgs e)
{
bool ratingIsOK = true;
for (int i = 0; i < GridView1.Rows.Count; i++)
{

GridViewRow gr = GridView1.Rows[i];
int emprating = 0;
if (((TextBox)gr.FindControl("tbSelfRating")).Text != "")
{
emprating =
int.Parse(((TextBox)gr.FindControl("tbSelfRating")).Text.ToString());
if (emprating < 1 || emprating > 5)
{
ratingIsOK = false;
}
}
else
{
ratingIsOK = false;
}
}
if (ratingIsOK == true)
{
btnAddRecord.Enabled = true;
lblDisplay.Text = "Click on the Add Records Button !";
}
else
{
lblDisplay.Text = "Please Check the Inputs... And Try Again!!";
}
}
protected void btnAddRecord_Click(object sender, EventArgs e)
{
HttpCookie c = Request.Cookies["USERS"];
string uname = c["empID"].ToString();
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridViewRow gr = GridView1.Rows[i];
int parameterid =
int.Parse(((Label)gr.FindControl("Label1")).Text);
int emprating =
int.Parse(((TextBox)gr.FindControl("tbSelfRating")).Text);
SqlCommand cmd = new SqlCommand("insert into
rating(empid,parameterId,empRating) values (@var1,@var2,@var3)", con);
cmd.Parameters.AddWithValue("@var1", uname);
cmd.Parameters.AddWithValue("@var2", parameterid);
cmd.Parameters.AddWithValue("@var3", emprating);
try{
con.Open();
cmd.ExecuteNonQuery();
con.Close();
btnAddRecord.Visible = false;
GridView1.Visible = false;
lblDisplay.Text = "Record Added!";
}
catch(Exception ee)
{
lblDisplay.Text = "Error";
btnVerify.Visible = true;
btnAddRecord.Visible = false;
}

}
lblDisplay.Text = "Record Added!";
SqlCommand cmd1 = new SqlCommand("update EmployeeTable set
isFilled='true' where empId= @var1", con);
cmd1.Parameters.AddWithValue("@var1", uname);
try
{
con.Open();
cmd1.ExecuteNonQuery();
con.Close();
}
catch (Exception ee)
{
lblDisplay.Text = "Error";
}
Response.Redirect("Default.aspx");
}
protected void btnViewing_Click(object sender, EventArgs e)
{
HttpCookie c = Request.Cookies["USERS"];
panelRate.Visible = false;
PanelView.Visible = true;
DataTable dt = new DataTable();
dt.Columns.Add("ParameterID");
dt.Columns.Add("Parameter");
dt.Columns.Add("empRating");
dt.Columns.Add("HODRating");
dt.Columns.Add("Comments");
Session["dt"] = dt;
string uname = c["empID"].ToString();
string query = String.Format("select parameterId, empRating,
hodRating, hodComment from Rating where empid='{0}'", uname);
SqlDataAdapter da0 = new SqlDataAdapter(query, con);
DataSet ds0 = new DataSet();
da0.Fill(ds0, "Rating");
DataTable dt0 = ds0.Tables[0];
foreach (DataRow dr in dt0.Rows)
{
DataRow drM = ((DataTable)Session["dt"]).NewRow();
drM[0] = dr[0].ToString();
drM[1] = dr[1].ToString();
drM[3] = dr[2].ToString();
drM[4] = dr[3].ToString();
SqlCommand cmd1 = new SqlCommand("select parameter from dataTable
where parameterId=@var1", con);
cmd1.Parameters.AddWithValue("@var1", drM[0].ToString());
con.Open();
string parameter = cmd1.ExecuteScalar().ToString();
drM[2] = parameter;
con.Close();

((DataTable)Session["dt"]).Rows.Add(drM);
}
GridViewView.DataSource = (DataTable)Session["dt"];
GridViewView.DataBind();

SqlCommand cmd2 = new SqlCommand("select avgRating from EmployeeTable


where empId=@var1", con);
cmd2.Parameters.AddWithValue("@var1", uname);
con.Open();
string avgRating = cmd2.ExecuteScalar().ToString();
lblavgRating.Text = avgRating;
con.Close();
SqlCommand cmd3 = new SqlCommand("select salaryHike from
EmployeeTable where empId=@var1", con);
cmd3.Parameters.AddWithValue("@var1", uname);
con.Open();
string hike = cmd3.ExecuteScalar().ToString();
salaryHike.Text = hike;
con.Close();
}
}

HOD Page (hod/Default.aspx)

Coding for HOD Page (hod/Default.aspx.cs):


using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Data;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class hod_Default : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(conSettings.conStr);
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie c = Request.Cookies["USERS"];
if (IsPostBack == false)
{
if (c == null)
Response.Redirect("..\\Default.aspx");
else
{
con.Open();
string uname = c["empID"].ToString();
string password = c["empPASS"].ToString();
string query = String.Format("Select * from
[dbo].[EmployeeTable] where empId= '{0}'", uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();

r.Read();
if (r["empPASS"].ToString() == password)
{
lblLogin.Text = "Welcome " + r["empName"].ToString() +
"(" + r["empId"].ToString() + ")";
}
else
lblLogin.Text = "Please Login Again";
}
con.Close();
}
if (IsPostBack == false)
{
string HOD = c["empID"].ToString();
SqlCommand cmd1 = new SqlCommand("SELECT empId FROM EmployeeTable
where HOD = @var1 and isFilled='true'", con);
cmd1.Parameters.AddWithValue("@var1", HOD);
con.Open();
SqlDataReader r1 = cmd1.ExecuteReader();
string drpItem;
while (r1.Read())
{
drpItem = r1["empId"].ToString();
drpEmp.Items.Add(drpItem);
}
r1.Close();
con.Close();
}
}

protected void btnLogout_Click(object sender, EventArgs e)


{
HttpCookie c = Request.Cookies["USERS"];
c.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(c);
Response.Redirect("..\\Default.aspx");
}
protected void drpEmp_SelectedIndexChanged(object sender, EventArgs e)
{
Session["drpEMP"] = drpEmp.SelectedItem.Text;
}
protected void btnShow_Click(object sender, EventArgs e)
{
string emp = (string)Session["drpEMP"];
GridView1.Visible = true;
DataTable dt = new DataTable();
dt.Columns.Add("ParameterID");
dt.Columns.Add("Parameter");
dt.Columns.Add("empRating");
Session["dt"] = dt;
SqlDataAdapter da0 = new SqlDataAdapter("select parameterId,
parameter from dataTable", con);

DataSet ds0 = new DataSet();


da0.Fill(ds0, "dataTable");
DataTable dt0 = ds0.Tables[0];
foreach (DataRow dr in dt0.Rows)
{
DataRow drM = ((DataTable)Session["dt"]).NewRow();
drM[0] = dr[0].ToString();
drM[1] = dr[1].ToString();
SqlCommand cmd1 = new SqlCommand("select emprating from rating
where empid=@var1 and parameterid=@var2", con);
cmd1.Parameters.AddWithValue("@var1", emp);
cmd1.Parameters.AddWithValue("@var2", drM[0].ToString());
con.Open();
string rating = cmd1.ExecuteScalar().ToString();
drM[2] = rating;
con.Close();
((DataTable)Session["dt"]).Rows.Add(drM);
}
SqlCommand cmd2 = new SqlCommand("select empName, empCont from
EmployeeTable where empId=@var1", con);
cmd2.Parameters.AddWithValue("@var1", emp);
con.Open();
SqlDataReader r = cmd2.ExecuteReader();
if (r.Read())
{
lblName.Text = r["empName"].ToString();
lblContact.Text = r["empCont"].ToString();
details.Visible = true;
}
con.Close();
GridView1.DataSource = (DataTable)Session["dt"];
GridView1.DataBind();
btnHODSubmit.Visible = true;
btnVerify.Visible = true;
}
protected void btnHODSubmit_Click(object sender, EventArgs e)
{
string emp = (string)Session["drpEMP"];
int totalRating = 0;
for (int i = 0, j = 1; i < GridView1.Rows.Count; i++,j++)
{
int paramId = j;
GridViewRow gr = GridView1.Rows[i];
int HODrating =
int.Parse(((TextBox)gr.FindControl("tbRating")).Text);
totalRating = totalRating + HODrating;
string comment = ((TextBox)gr.FindControl("tbComment")).Text;
SqlCommand cmd = new SqlCommand("UPDATE Rating set hodRating=
@var1, hodComment= @var2 where empId=@var3 and parameterId=@var4
", con);

cmd.Parameters.AddWithValue("@var1",
cmd.Parameters.AddWithValue("@var2",
cmd.Parameters.AddWithValue("@var3",
cmd.Parameters.AddWithValue("@var4",
try
{
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ee)
{
lblDisplay.Text = "Error!";
}

HODrating);
comment);
emp);
paramId);

}
int noOfRecords = GridView1.Rows.Count;
int avg=0;
try
{
avg = totalRating / noOfRecords;
}
catch (Exception eee)
{
//avg=0;
}
SqlCommand cmd1 = new SqlCommand("UPDATE EmployeeTable set
avgRating= @var1 where empId=@var2 ", con);
cmd1.Parameters.AddWithValue("@var1", avg);
cmd1.Parameters.AddWithValue("@var2", emp);
try
{
con.Open();
cmd1.ExecuteNonQuery();
con.Close();
}
catch (Exception eeee)
{
lblDisplay.Text = "Error!";
}
GridView1.Visible = false;
lblDisplay.Text = "Record Updated";
btnHODSubmit.Enabled = false;
btnHODSubmit.Visible = false;
btnVerify.Visible = false;
}
protected void btnVerify_Click(object sender, EventArgs e)
{
string emp = (string)Session["drpEMP"];
int totalRating = 0;
bool ratingIsOK = true;

for (int i = 1; i < GridView1.Rows.Count; i++)


{
GridViewRow gr = GridView1.Rows[i];
int emprating = 0;
if (((TextBox)gr.FindControl("tbRating")).Text != "")
{
emprating =
int.Parse(((TextBox)gr.FindControl("tbRating")).Text.ToString());
if (emprating < 1 || emprating > 5)
{
ratingIsOK = false;
}
}
else
{
ratingIsOK = false;
}
}
if (ratingIsOK == true)
{
btnHODSubmit.Enabled = true;
lblDisplay.Text = "";
}
else
{
lblDisplay.Text = "Please Check the Inputs... And Try Again!!";
}
}
}

HRM Page (hrm/Default.aspx)

Coding for HRM Page (hrm/Default.aspx.cs):


using
using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Data;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class HRM_Default : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(conSettings.conStr);
string emp_id;
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack == false)
{
HttpCookie c = Request.Cookies["USERS"];
if (c == null)
Response.Redirect("..\\Default.aspx");
else
{
con.Open();
string uname = c["empID"].ToString();
string password = c["empPASS"].ToString();
string query = String.Format("SELECT * FROM
[dbo].[EmployeeTable] where empId = '{0}'", uname);
SqlCommand cmd = new SqlCommand(query, con);
SqlDataReader r = cmd.ExecuteReader();
r.Read();
if (r["empPASS"].ToString() == password)

{
lblLogin.Text = "Welcome" + r["empName"].ToString() + "("
+ r["empId"].ToString() + ")";
r.Close();
}
else
lblLogin.Text = "Please Login Again";
}
con.Close();

drpboxDepart.Items.Clear();
string query1 = string.Format("Select empDept from EmployeeTable
where empStatus='HOD'");
SqlCommand cmd1 = new SqlCommand(query1, con);
con.Open();
SqlDataReader r1 = cmd1.ExecuteReader();
while (r1.Read())
{
string dept = r1["empDept"].ToString();
drpboxDepart.Items.Add(dept);
}
r1.Close();
con.Close();
}
}

protected void btnLogOut_Click(object sender, EventArgs e)


{
HttpCookie c = Request.Cookies["USERS"];
c.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(c);
Response.Redirect("..\\Default.aspx");
}
protected void btnView_Click(object sender, EventArgs e)
{
string drpData = drpboxEmpID.SelectedItem.Text;
emp_id = drpData;
DataTable dt = new DataTable();
dt.Columns.Add("ParameterID");
dt.Columns.Add("Parameter");
dt.Columns.Add("HODRating");
dt.Columns.Add("Comments");
Session["dt"] = dt;
string query= string.Format("select parameterId, hodRating,
hodComment from Rating where empId='{0}'",drpData);
SqlDataAdapter da0 = new SqlDataAdapter(query, con);
DataSet ds0 = new DataSet();
da0.Fill(ds0, "Rating");
DataTable dt0 = ds0.Tables[0];
foreach (DataRow dr in dt0.Rows)

{
DataRow drM = ((DataTable)Session["dt"]).NewRow();
drM[0] = dr[0].ToString();
drM[2] = dr[1].ToString();
drM[3] = dr[2].ToString();
SqlCommand cmd1 = new SqlCommand("select parameter from dataTable
where parameterId=@var1", con);
cmd1.Parameters.AddWithValue("@var1", drM[0].ToString());
con.Open();
string parameter = cmd1.ExecuteScalar().ToString();
drM[1] = parameter;
con.Close();

((DataTable)Session["dt"]).Rows.Add(drM);
}
gridviewDetails.DataSource = (DataTable)Session["dt"];
gridviewDetails.DataBind();
btnAvg.Visible = true;
}

protected void btnFindDept_Click(object sender, EventArgs e)


{
string drpDepart = drpboxDepart.Text;
string query = string.Format("Select empId from EmployeeTable where
empDept='{0}' and empStatus= 'EMP'",drpDepart);
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
SqlDataReader r = cmd.ExecuteReader();
while (r.Read())
{
drpboxEmpID.Items.Add(r["empId"].ToString());
}
r.Close();
con.Close();
btnView.Enabled = true;
}
protected void btnAvg_Click(object sender, EventArgs e)
{
string drpData = drpboxEmpID.SelectedItem.Text;
string query = string.Format("Select avgRating from EmployeeTable
where empId='{0}'", drpData);
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
SqlDataReader r = cmd.ExecuteReader();
if (r.Read())
{
lblAvg.Text = r["avgRating"].ToString();
int AVGforHike = int.Parse(r["avgRating"].ToString());
int hike=0;
switch (AVGforHike)
{
case 1: hike = 0;
break;
case 2: hike = 2;
break;

case 3: hike = 4;
break;
case 4: hike = 5;
break;
case 5: hike = 10;
break;
default: hike = 0;
break;
}
tbHike.Text = hike.ToString();
}
r.Close();
con.Close();
lblAvg.Visible = true;
tbHike.Visible = true;
btnHike.Visible = true;
}
protected void btnHike_Click(object sender, EventArgs e)
{
string drpData = drpboxEmpID.SelectedItem.Text;
string query = string.Format("UPDATE EmployeeTable set salaryHike
='{0}' where empId='{1}'",tbHike.Text,drpData );
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
lblAvg.Text = "Hike Allowed";
btnHike.Visible = false;
btnAvg.Visible = false;
tbHike.Visible = false;
}
protected void drpboxEmpID_SelectedIndexChanged(object sender, EventArgs
e)
{
string drpData = drpboxDepart.SelectedItem.Text;
btnView.Enabled = true;
}
protected void drpboxDepart_SelectedIndexChanged(object sender, EventArgs
e)
{
string drpDepart = drpboxDepart.Text;
btnFindDept.Enabled = true;
}
}

Admin Page (admin/Default.aspx)

Code for Admin Page (admin/Default.aspx.cs):


using
using
using
using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
}

protected void btnCancel_Click(object sender, EventArgs e)


{
Response.Redirect("..\\Default.aspx");
}
protected void btnLogin_Click(object sender, EventArgs e)
{
HttpCookie adminC = new HttpCookie("AUSERS");
if (adminC["AUSERS"] == null)
{
adminC["uname"] = "";
adminC["pass"] = "";
}
if (tbUname.Text == "admin" && tbPassword.Text == "admin")

{
adminC["uname"] = tbUname.Text.ToString();
adminC["pass"] = tbPassword.Text.ToString();
Response.Cookies.Add(adminC);
Response.Redirect("Update.aspx");
}
else
lblDisplay.Text = "Access Denied!";
}
}

Code for Update Page (admin/Update.aspx.cs):


using
using
using
using
using
using
using

System;
System.Collections.Generic;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.UI;
System.Web.UI.WebControls;

public partial class Rating : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(conSettings.conStr);
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack == false)
{
HttpCookie adminC = Request.Cookies["AUSERS"];
if (adminC == null)
Response.Redirect("Default.aspx");
else
{
panelShow.Visible = true;
}
}
}
protected void btnLogout_Click(object sender, EventArgs e)
{
HttpCookie adminC = Request.Cookies["AUSERS"];
adminC.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(adminC);
Response.Redirect("Default.aspx");
}

protected void btnAddGoal_Click(object sender, EventArgs e)


{
goals.Visible = true;
string query = String.Format("SELECT MAX(parameterId) FROM
dataTable");
SqlCommand cmd = new SqlCommand(query,con);
con.Open();
string pid=cmd.ExecuteScalar().ToString();
con.Close();
tbParamID.Text= ((int.Parse(pid)+1)).ToString();

}
protected void btnSubmitdataTable_Click(object sender, EventArgs e)
{
string paramID = tbParamID.Text;
string parameter = tbParameter.Text;
string query = String.Format("INSERT INTO dataTable Values(
'{0}','{1}')",paramID,parameter);
try
{
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
lblDisplay.Text = "Record Added !";
tbParamID.Text = (int.Parse(paramID) + 1).ToString();
tbParameter.Text = "";
}
catch (Exception ee)
{
lblDisplay.Text = "Error !";
}
}
}

Code for Connection Settings (App_Code/conSettings.cs):


using
using
using
using
using

System;
System.Collections.Generic;
System.Configuration;
System.Linq;
System.Web;

public class conSettings


{
public static string
conStr=ConfigurationManager.ConnectionStrings["conStr"].ConnectionString;
public static System.Data.SqlClient.SqlConnection con { get; set; }
}

Requirement Specification
Domain Description:
The project is based on the Employees and The HRM and the Head of the Department
(HOD). Employee asses his/her performance based on the several GOALS set by the HRM
department in the Appraisal form done for each Employee including the HOD. The HOD is also
permitted and has to assess his employees in all those fields and will mark out of 5. At last after
all fields reasonably marked the average of the total is calculated and accordingly the
Employee's salary is hiked or he is promoted or rewarded.

Problem Definition:
The destination of this project is to accept ratings for all the employees in all the
departments of any particular farm. Both the ratings of the HOD of that department as well as
that employee's is being recorded along with HOD's comment. Considering all the ratings done
by HOD only, the hike on salary will be calculated and shown by the system only.

Functional Requirements:

User 1: Employees
He is allowed to rate himself. He can also see his hike after the total rating is done by the HOD.

User 2: Head of the Department

He is allowed to rate the employees of his department only.

User 3: Human Resource Management

He is allowed to select the departments and see the average ratings of the employees of that
department and based on that he can allow salary hike to that employee.

Hardware /Software Requirements:


Computers with a minimum 1GB of RAM, Processor 1.2Ghz Clock Speed and 10GB of
Hard Disk Space with a Browser that supports HTTP requests is required on the client side.
Servers running Windows Server OS that supports IIS and also supports ASP.net scripts
are required.

Future Scope OF Improvement


This project is a sub part of a complete project. Due to a very short span of time
and limitation of our knowledge, it had not been possible for us to incorporate each
and every element that would enhance this project. If it is incorporated in a
business organization there is a lot of scope of improvement in this particular
project.
Here the Employee table under consideration is taken as static. So for
making it more effective the table can be made dynamic. So that employee
addition or deletion will be possible.
New projects can be assigned by the HODs to the employees of respected
departments with a deadline. So if accomplished additional points can be
given to them for that.
HRM can also rate the performance of the HODs based on their
effectiveness on the employees and can allow salary hike to them as well.
The look and feel of the webpage could be made more attractive.

Certificate
This is to certify that Mr. Sumit Kar of Swami Vivekananda Institute Of Science
And Technology, registration number: 122410110055, has successfully completed
a project on Online Appraisal Management using .Net under the guidance of Mr.
Sudipto Kr. Mukherjee.

-----------------------------------------------------Mr. Sudipto Kr. Mukherjee


Globsyn Finishing School
(A division of Globsyn Skills)

Certificate
This is to certify that Ms. Rukhsar Aziz of Swami Vivekananda Institute Of
Science And Technology, registration number: 122410110039, has successfully
completed a project on Online Appraisal Management using .Net under the
guidance of Mr. Sudipto Kr. Mukherjee.

-----------------------------------------------------Mr. Sudipto Kr. Mukherjee


Globsyn Finishing School
(A division of Globsyn Skills)

Certificate
This is to certify that Mr. Soham Purkait of Swami Vivekananda Institute Of
Science And Technology, registration number: 122410110128, has successfully
completed a project on Online Appraisal Management using .Net under the
guidance of Mr. Sudipto Kr. Mukherjee.

-----------------------------------------------------Mr. Sudipto Kr. Mukherjee


Globsyn Finishing School
(A division of Globsyn Skills)

Certificate
This is to certify that Ms. Swagata Banerjee of Swami Vivekananda Institute Of
Science And Technology, registration number: 122410110058, has successfully
completed a project on Online Appraisal Management using .Net under the
guidance of Mr. Sudipto Kr. Mukherjee.

-----------------------------------------------------Mr. Sudipto Kr. Mukherjee


Globsyn Finishing School
(A division of Globsyn Skills)

Certificate
This is to certify that Mr. Sayandeep Majumdar of Swami Vivekananda Institute
Of Science And Technology, registration number: 122410110044, has successfully
completed a project on Online Appraisal Management using .Net under the
guidance of Mr. Sudipto Kr. Mukherjee.

-----------------------------------------------------Mr. Sudipto Kr. Mukherjee


Globsyn Finishing School
(A division of Globsyn Skills)

You might also like