Professional Documents
Culture Documents
Documentation Sonal
Documentation Sonal
PLANNING
CERTIFICATE OF APPROVAL
CERTIFICATE OF ORIGINALITY
ACKNOWLEDGEMENT
First and foremost, I would like to thank our supervisor of this project, for
the valuable guidance and advice. He inspired me greatly to work in this
project. I would also like to thank him for guiding me with some samples
that related to the topic of our project. Besides, I would also like to thank
the authority of Jean Martin, Chennai for providing me with a good
environment and facilities to complete this project.
INDEX OF SYNOPSIS
Contents
1. ABOUT THE ORGANISATION..................................................................................................8
2. INTRODUCTION.........................................................................................................................9
3. PROJECT OBJECTIVE..............................................................................................................10
4. TOOLS AND PLATFORM REQUIRED....................................................................................11
5. SDLC...........................................................................................................................................15
5.1. PRELIMINARY INVESTIGATION.......................................................................................16
5.2. REQUIREMENT GATHERING AND ANALYSIS :.............................................................17
5.3. FEASIBILITY STUDY...........................................................................................................18
5.4. PROJECT PLANNING...........................................................................................................20
5.5. PROJECT SCHEDULING......................................................................................................21
5.7. ERD (ENTITY RELATIONSHIP DIAGRAM)......................................................................25
5.8. FLOW CHART.......................................................................................................................32
5.9. DFD ( DATAFLOW DIAGRAM )..........................................................................................34
5.10. FUNCTIONAL DESCRIPTION.........................................................................................39
6. SYSTEM DESIGN......................................................................................................................40
6.1. MODULARISATION DETAIL..............................................................................................41
6.2. DATABASE DESIGN............................................................................................................42
6.3. USER INTERFACE DESIGN.................................................................................................48
7. CODING.....................................................................................................................................55
8. TESTING..................................................................................................................................153
9. IMPLEMENTING BI................................................................................................................157
9.1. BI for HR PLANNING..........................................................................................................158
9.2. WORKING WITH BI (MS-SQL AND FLAT FILES)..........................................................160
9.3. BI DASHBOARD, REPORTS AND MODELS....................................................................161
9.4. WORKING WITH POWER BI DESKTOP..........................................................................162
10. REPORTS.............................................................................................................................201
11. SYSTEM MAINTENANCE.................................................................................................205
12. FUTURE SCOPE..................................................................................................................206
13. PROJECT LIMITATION AND FURTHER DEVELPOMENT............................................207
14. CONCLUSION.....................................................................................................................208
15. REFERENCES......................................................................................................................209
Objective:
Software publishing
Consultancy and supply [Software publishing includes production
supply and documentation of ready-made (non-customized)
software, operating systems software, business & other
applications software, computer games software for all platforms.
Consultancy includes providing the best solution in the form of
custom software after analyzing the users’ needs and problems.
Custom software also includes made-to-order software based on
orders from specific users. Also, included are writing of software of
any kind following directives of the users; software maintenance,
web-page design].
2. INTRODUCTION
The technology, methods, and applications used for integration and presentation of
business information, is known as Business Intelligence System.
Through Business Intelligence, one is enabled to have a more tactical and meaningful
business decisions.
1. It is user friendly.
2. It is having less paperwork.
3. Efficient tractability.
4. Various reports and forms can be generated.
3. PROJECT OBJECTIVE
The project is based on real life scenario that proves to be helpful for the
organization to earn profit and analyse the performance via bringing in
software driven or process driven resources management.
Automate
Intelligence process
SOFTWARE REQUIREMENTS:
Microsoft Power BI
C#
Visual Basic.Net
Jscript
J#
ASP.NET is used to produce interactive, data-driven web applications
over the internet. It consists of a large number of controls such as text
boxes, buttons, and labels for assembling, configuring, and
manipulating code to create HTML pages.
C#
MS-SQL
ADO.NET
5. SDLC
SDLC (Software Development life cycle) models describe phases of the
software cycle and the order in which those phases are executed. Each
phase produces deliverables required by the next phase in the life cycle.
Requirements are translated into design. Code is produced according to
the design which is called development phase. After coding and
development the testing verifies the deliverable of the implementation
phase against requirements. The testing team follows Software Testing
Life Cycle (STLC) which is similar to the development cycle followed by
the development team.
One of the most difficult tasks of the system analyst, to identifying real
problem of the existing system. Without clear understanding of the
problem in the system, any further work done could lead to wastage of
effort at a later stage.
In this phase Business requirements are gathered. This phase is the main
focus of the project managers and stake holders. Meetings with
managers, stake holders and users are held in order to determine the
requirements like;
Operational Feasibility:
The proposed system solves the problems, and takes advantage of
the opportunities identified during scope definition and satisfies
the requirements identified in the requirements analysis phase of
system development.
It often focuses on the degree to which the proposed development
project fits in with the existing business environment and
Technical Feasibility:
The management provides latest hardware and software facilities
for the successful completion of the projects. With these latest
hardware and software support the system will perform extremely
well.
A project is made up of many tasks, and each task is given a start and
end (or due date), so it can be completed on time. Likewise, people have
different schedules, and their availability and vacation or leave dates
need to be documented in order to successfully plan those tasks.
PERT CHART:
A PERT chart is a project management tool used to schedule, organize,
and coordinate tasks within a project.
The PERT chart representation of the “BI for HR Planning” is shown below:
11th Jan 20th Jan 11th Jan 26th Feb 21st Mar
To To To To To
20th Jan 10th Feb 25th Feb 20th Mar 31st Mar
Data
Database Coding
Project Gathering
Design Part
Specificatio Part
Part
n
2nd Jan 21st Apr 1st Apr
To To To
th
10 Jan th
30 Apr 20th Apr
Flowchar
Start Finish BI Part
t
Design
GUI Business
Work Testing
Design Warehousin
Analysis Part
Part g
GANTT CHART:
A Gantt chart is a type of bar chart that illustrates a project schedule.
Modern Gantt charts also show the dependency relationships between
activities and current schedule status.
Gantt charts allow project managers to track the progress of the entire
project. Through Gantt charts, the project manager can keep a track of
the individual tasks as well as of the overall project progression.
Specification
& Analysis
Design
Flowchart
Design
Database
Design GUI
Code GUI
Part
Code
Database
Part
Testing
Business Intelligence
Advantage of this
methodology:
Efficient and face-to-face communication
Very short feedback loop and adaptation cycle
Quality focus.
ad_username
ad_id ad_password
IAdminLogin
A div_name
div_id
C
handles
IDivisionMaster
ILeaveMasters
dept_name
dept_id
lev_id div_id
lev_day
casual_type
forml_type IDepartmentMaster
lev_day
desig_name
desig_id
IDesignationMaster
gender
L_name dob
marital_status
f_nama
A
title nationality
emp_id contact
manages email
IEmpTable
div_id
doj
dept_id
to_date desig_id
from_date
add1
temp_reason
Work_exp qualification
certification
dr_allownc
B ISalaryReg
hra_allownc
en_allownc
modify_date convy_allownc
net_pay med_allownc
tot_ded pf
tot_earn
sick_leave
casual_leave year
C emp_id month
days
id
wdays
maintains
tbl_attendance Total_Number_of_Days_Pr
esent
casual_leave_taken
D
sick_leave_taken
Title Fname
D Lname
emp_id
Division
Department
Attendancupdate_master Designation
Year
Available_Sick_Leave
Month
Total_Days
Sick_Leave_Taken
Working_Days
Available_Casual_Leave Total_Number_Of_Days_Present
Casual_Leave_Taken
A DFD shows what kind of information will be input to and output from
the system, how the data will advance through the system, and where
the data will be stored. It does not show information about process
timing or whether processes will operate in sequence or in parallel,
unlike a traditional structured flowchart which focuses on control flow, or
a UML activity workflow diagram, which presents both control and data,
flows as a unified model.
CHARACTERISTICS OF DFD:
1.0
enters Master Database maintains and
information updates
ADMIN master
databases
provides information
provides information
3.0 maintains and
Salary updates
Management ISalaryRegTable
provides
information
provides
4.0 information
Attendance tbl_attendance
updates
Management
upload
information
5.0
proceeds Payroll provides attendancupdate_
Processing information master
1.1
enters division Division
name Handling process maintains and IDivisionMaster
ADMIN
updates
provides information
1.3
Designation
enters designation name Handling process maintains and IDesignationMaster
updates
1.4
select leave type Leave
Handling process maintains and ILeaveMaster
enter number of days updates
IDivisionMaster
provides information
2.1
Register New registered
process successfully
insert employee IEmpTable
ADMIN
details
provides information
provides information
provides information
3.2
select Employee ID Revise Salary
process modify
edit monthly salary
4.1
Export provides
select year,month Attendance information
ADMIN enter working days process tbl_attendance
updates
provides information
4.2
Import
Attendance
enter information insert attendancupdate_
process
data master
provides information
5.1
Process Payroll
proceeds
update
5.2
Edit Attendance
process
edit values
provides information
provides information
ISalaryRegTable
generates 5.2
Payslip
Generation
process payslip available
ADMIN
This project allows HR to plan, develop and administer policies and programmes
designed to make expeditious use of organisation’s human resources.
At last BI is applied.
6. SYSTEM DESIGN
Input requirement,
Output requirements,
Storage requirements,
Processing requirements,
System control and backup or recovery.
System design can generally be broken down into three sub-tasks:
Process Design
Data Design
Various forms have been used by the admin for the above
that are as follows:
Division Form
Department Form
Designation Form
Employee Registration Form
Employee Edit Form
Salary Registration Form
Salary Review Form
Attendance Handling Form
Payroll Processing Form
Leave
Year Nvarchar MAX Allow null Year
Month nvarchar MAX Allow null Month
days nvarchar MAX Allow null Number of days
in the month
wdays nvarchar MAX Allow null Total number of
working days
Total_Numb nvarchar MAX Allow null Total number of
er_Of_Days_ days present
Present
Casual_Leav nvarchar MAX Allow null Number of days
e_Taken casual leave
taken
Sick_Leave_T nvarchar MAX Allow null Number of days
aken sick leave taken
month
Working_Days nvarchar MAX Allow null Total working
days
Total_Number Nvarchar MAX Allow null Number of days
_Of_Days_Pres present
ent
Casual_Leave_ Nvarchar MAX Allow null Number of days
Taken casual leave
taken
Available_casu Nvarchar MAX Allow null Number of days
al_Leave Casual leave
allowed
Sick_Leave_Ta Nvarchar MAX Allow null Number of days
ken Sick leave taken
Available_Sick nvarchar MAX Allow null Number of days
_Leave Sick leave
allowed
1. Login Page:
2. Dashboard:
7. CODING
a) Login Page:
Login.aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs"
Inherits="pages_examples_Login" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet"
href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
width: 200px;
height: 100px;
display: none;
position: fixed;
background-color: White;
z-index: 999;
margin-top:-120PX;
<div class="login-box-body">
<div>
<div class="form-group has-feedback">
</div>
<a href="#"></a><br>
</div>
</div>
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../../plugins/iCheck/icheck.min.js"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' /* optional */
});
});
</script>
</div>
</form>
</body>
</html>
Login.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
this.data();
}
}
private void data()
{
Button1.Visible = true;
Button2.Visible = false;
}
else
{
Button1.Visible = false;
Button2.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
string qry = "select ad_username, ad_password From dbo.IAdminLogin where
ad_username='" + txt_userid.Text.Trim() + "' and ad_password='"+txt_pass.Text.Trim()
+"'";
SqlDataAdapter da = new SqlDataAdapter(qry, con);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session["uid"] = txt_userid.Text;
Response.Redirect("Main.aspx");
}
else
{
}
protected void Button2_Click(object sender, EventArgs e)
{
con.Open();
string qry = "insert into dbo.IAdminLogin( ad_username, ad_password) values('"
+ txt_userid.Text.Trim() + "','" + txt_pass.Text.Trim() + "')";
SqlCommand cmd = new SqlCommand(qry, con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("Login.aspx");
}
}
b) Dashboard:
Main.aspx code:
<%@ Page Title="" Language="C#" MasterPageFile="~/pages/examples/Admin.master"
AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="pages_examples_Main" %>
</asp:Content>
Main.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
}
c) Division Master:
Division.aspx code:
<%@ Page Title="" Language="C#" MasterPageFile="~/pages/examples/Admin.master"
AutoEventWireup="true" CodeFile="Division.aspx.cs" Inherits="pages_examples_Division"
%>
function BlockUI(elementID) {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(function () {
$("#" + elementID).block({ message: '<table align = "center"><tr><td>' +
'<img src="images/loadingAnim.gif"/></td></tr></table>',
css: {},
overlayCSS: { backgroundColor: '#000000', opacity: 0.6, border: '3px
solid #63B2EB'
}
});
});
prm.add_endRequest(function () {
$("#" + elementID).unblock();
});
}
$(document).ready(function () {
BlockUI("dvGrid");
$.blockUI.defaults.css = {};
});
</script>
<script>
function upper(ustr) {
var str = ustr.value;
ustr.value = str.toUpperCase();
}
function lower(ustr) {
var str = ustr.value;
ustr.value = str.toLowerCase();
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content-wrapper" style="margin-top:-900px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Division Master
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#"> Division Master </a></li>
<li class="active">Add Division </li>
</ol>
</section>
<div class="row">
<div class="col-md-4">
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
</section>
<!-- /.content -->
</div>
</asp:Content>
Division.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
GETDATA();
}
}
private void GETDATA()
{
string query = "select *from IDivisionMaster";
SqlDataAdapter da = new SqlDataAdapter(query,strConnString);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
private DataTable GetData(SqlCommand cmd)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection(strConnString);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
sda.SelectCommand = cmd;
sda.Fill(dt);
return dt;
}
protected void OnPaging(object sender, GridViewPageEventArgs e)
{
GETDATA();
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
GridView1.EditIndex = -1;
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
}
d) Department Master:
Adddepartment.aspx code:
function lower(ustr) {
var str = ustr.value;
ustr.value = str.toLowerCase();
}
</script>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-4">
<br />
<asp:TextBox ID="TextBox1" runat="server" class="form-control"
placeholder="Enter Department Name" onkeyup="upper(this)"></asp:TextBox>
<br />
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
</section>
<!-- /.content -->
</div>
</asp:Content>
Adddepartment.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class pages_examples_Adddepartment : System.Web.UI.Page
{
private String strConnString =
ConfigurationManager.ConnectionStrings["hms"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GETDATA();
department();
}
}
private void department()
{
DropDownList1.DataSource = dt;
DropDownList1.DataTextField = "div_name";
DropDownList1.DataValueField = "div_id";
DropDownList1.DataBind();
DropDownList1.Items.Insert(0,"--Select-Division--");
}
private void GETDATA()
{
string query = "select *from dbo.IDepartmentMaster";
SqlDataAdapter da = new SqlDataAdapter(query, strConnString);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
private DataTable GetData(SqlCommand cmd)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection(strConnString);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
sda.SelectCommand = cmd;
sda.Fill(dt);
return dt;
}
protected void OnPaging(object sender, GridViewPageEventArgs e)
{
GETDATA();
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
GridView1.EditIndex = -1;
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
e) Designation Master:
Designationmaster.aspx code:
<div class="row">
<div class="col-md-4">
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
</section>
<!-- /.content -->
</div>
</asp:Content>
Designationmaster.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
GETDATA();
}
private void GETDATA()
{
string query = "select *from dbo.IDesignationMaster";
SqlDataAdapter da = new SqlDataAdapter(query,strConnString);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
private DataTable GetData(SqlCommand cmd)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection(strConnString);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
sda.SelectCommand = cmd;
sda.Fill(dt);
return dt;
}
protected void OnPaging(object sender, GridViewPageEventArgs e)
{
GETDATA();
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
GridView1.EditIndex = -1;
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
}
f) Leave:
Addleave.aspx code:
<div class="row">
<div class="col-md-4">
</asp:DropDownList>
<br />
<asp:TextBox ID="TextBox2" runat="server" class="form-control"
placeholder="Enter Total Day" onkeyup="upper(this)"></asp:TextBox>
<br />
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "200px" HeaderText = "No of Days" >
<ItemTemplate>
<asp:Label ID="lblday" runat="server" Text='<%# Eval("lev_day")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtday" runat="server" Text='<%# Eval("lev_day")%>'
onkeyup="upper(this)"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
</section>
<!-- /.content -->
</div>
</asp:Content>
Addleave.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
GETDATA();
}
private void GETDATA()
}
private DataTable GetData(SqlCommand cmd)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection(strConnString);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
sda.SelectCommand = cmd;
sda.Fill(dt);
return dt;
}
protected void OnPaging(object sender, GridViewPageEventArgs e)
{
GETDATA();
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
GridView1.EditIndex = -1;
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = GetData(cmd);
GridView1.DataBind();
}
}
registration.aspx code:
</h1>
<asp:Label ID="lblcasul" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="lblsick" runat="server" Text="" Visible="false"></asp:Label>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Employee Management</a></li>
<li class="active">Employee Registration Form</li>
</ol>
</section>
<script language=javascript>
function upper(ustr) {
var str = ustr.value;
ustr.value = str.toUpperCase();
}
function lower(ustr) {
var str = ustr.value;
ustr.value = str.toLowerCase();
}
</script>
<script type="text/javascript">
function validate(evt) {
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>
<script type="text/javascript">
function ValidateAlpha(evt) {
var keyCode = (evt.which) ? evt.which : evt.keyCode
if ((keyCode < 65 || keyCode > 90) && (keyCode < 97 || keyCode > 123)
&& (keyCode != 32))
return false;
return true;
function noSpace(obj) {
obj.value = obj.value.replace(/\s/g, "");
}
</script>
<script type="text/javascript">
function GetDynamicTextBox(value) {
return '<input name = "DynamicTextBox" type="text" value = "' + value + '"
/>' +
'<input type="button" value="x" onclick = "RemoveTextBox(this)"
class="btn-danger" />'
}
function AddTextBox() {
var div = document.createElement('DIV');
div.innerHTML = GetDynamicTextBox("");
document.getElementById("TextBoxContainer").appendChild(div);
}
function RemoveTextBox(div) {
document.getElementById("TextBoxContainer").removeChild(div.parentNode);
}
function RecreateDynamicTextboxes() {
var values = eval('<%=Values%>');
if (values != null) {
var html = "";
for (var i = 0; i < values.length; i++) {
html += "<div>" + GetDynamicTextBox(values[i]) + "</div>";
}
document.getElementById("TextBoxContainer").innerHTML = html;
}
}
window.onload = RecreateDynamicTextboxes;
</script>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- left column -->
<div class="col-md-6">
<!-- general form elements -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Personal Information</h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div role="form">
<div class="box-body">
<div class="form-group">
<label for="exampleInputEmail1">Title</label>
<asp:DropDownList ID="DropDownList1title" runat="server" class="form-control">
</asp:DropDownList>
</div>
<div class="form-group">
<label for="exampleInputEmail1">First Name</label>
<asp:TextBox ID="txt_fname" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" id="tstds"
controltovalidate="txt_fname" errormessage="Please enter your First name!"
ForeColor="Red" />
</div>
<div class="form-group">
<label for="exampleInputEmail1">Last Name</label>
<asp:TextBox ID="txt_lastname" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator runat="server"
id="RequiredFieldValidator1" controltovalidate="txt_lastname" errormessage="Please
enter your Last name!" ForeColor="Red"/>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Gender :</label>
<asp:RadioButtonList ID="RadioButtonList1gender" runat="server">
<asp:ListItem Value="Male">Male</asp:ListItem>
<asp:ListItem Value="Female">Female</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7"
runat="server" ControlToValidate="RadioButtonList1gender"
ErrorMessage="select Gender!"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
<div class="form-group">
<label for="exampleInputFile">DOB</label>
<asp:TextBox ID="txt_dob" runat="server" class="form-control"
type="date"></asp:TextBox>
<div class="form-group">
<label for="exampleInputPassword1">Marital Status :</label>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Value="Single">Single
</asp:ListItem>
<asp:ListItem Value="Married">Married</asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
<div class="form-group">
<label for="exampleInputFile">Nationality</label>
<asp:TextBox ID="txt_natinality" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6"
runat="server" ControlToValidate="txt_natinality"
ErrorMessage="Nationality can't be blank!"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
<div class="form-group">
<label for="exampleInputFile">Contact Number</label>
<asp:TextBox ID="txt_contact" runat="server" class="form-control"
onkeypress="return validate(event);" MaxLength="10"></asp:TextBox>
</div>
<div class="form-group">
<label for="exampleInputFile">Email</label>
<asp:TextBox ID="txt_email" runat="server" class="form-control"
></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="txt_email"
ErrorMessage="Email can't be blank!"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
<div class="form-group">
<label for="exampleInputFile">Division</label>
<asp:DropDownList ID="DropDownList2division" runat="server"
class="form-control"
onselectedindexchanged="DropDownList2division_SelectedIndexChanged"
AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5"
runat="server" ControlToValidate="DropDownList2division"
ErrorMessage="Please Select Division!" InitialValue="-Select
Division-" ForeColor="Red"></asp:RequiredFieldValidator>
</div>
<div class="form-group">
<label for="exampleInputFile">Department</label>
<asp:DropDownList ID="DropDownList4department" runat="server"
class="form-control"></asp:DropDownList>
</div>
<div class="form-group">
<label for="exampleInputFile">Designation</label>
<asp:DropDownList ID="DropDownList3designation" runat="server"
class="form-control"></asp:DropDownList>
</div>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- /.box -->
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<!--/.col (left) -->
<!-- right column -->
<div class="col-md-6">
<!-- Horizontal Form -->
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">Address Information</h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div class="form-horizontal">
<div class="box-body">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Address
Line1</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_lineone" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator8"
runat="server" ControlToValidate="txt_lineone"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Address
Line2</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_line2" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9"
runat="server" ControlToValidate="txt_line2"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Address
Line3</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_line3" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator10"
runat="server" ControlToValidate="txt_line3"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">City</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_city" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11"
runat="server" ControlToValidate="txt_city"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-
label">District</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_district" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12"
runat="server" ControlToValidate="txt_district"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="col-sm-9">
<asp:TextBox ID="txt_state" runat="server" class="form-control"
onkeyup="upper(this)"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator13"
runat="server" ControlToValidate="txt_state"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label"
>Pincode</label>
<div class="col-sm-9">
<asp:TextBox ID="txt_pin" runat="server" class="form-control"
onkeypress="return validate(event);" MaxLength="6" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator14"
runat="server" ControlToValidate="txt_pin"
ErrorMessage="Can't be blank"
ForeColor="Red"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Address
Proof</label>
<div class="col-sm-9">
<asp:RadioButtonList ID="RadioButtonList2address" runat="server">
<asp:ListItem>Adhaar Card
</asp:ListItem>
<asp:ListItem>Voter ID</asp:ListItem>
<asp:ListItem>Passport</asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">Upload
Proof</label>
<div class="col-sm-9">
<asp:FileUpload ID="memberimg" runat="server" />
<asp:RequiredFieldValidator runat="server" id="RequiredFieldValidator2"
controltovalidate="memberimg" errormessage="Upload Proof!" ForeColor="Red" />
</div>
</div>
</div>
<!-- /.box-body -->
<div id="TextBoxContainer">
<!--Textboxes will be added here -->
</div>
<br />
</div>
</div>
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Other Info</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-3">
Date of Joining
</div>
<div class="col-xs-9">
<asp:TextBox ID="txt_dateofjoin" runat="server" class="form-control"
type="date"></asp:TextBox>
</div>
</div>
<asp:Button ID="Button1" runat="server" Text="Register" class="btn btn-
primary"
registration.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using System.Data.SqlClient;
using System.Configuration;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Web.Script.Serialization;
devisiondetails();
designation();
UpdatePanel1.Visible = false;
sickleave();
Casualleave();
}
}
DropDownList3designation.DataSource = dt;
DropDownList3designation.DataTextField = "desig_name";
DropDownList3designation.DataValueField = "desig_id";
DropDownList3designation.DataBind();
DropDownList2division.DataSource = dt;
DropDownList2division.DataTextField = "div_name";
DropDownList2division.DataValueField = "div_id";
DropDownList2division.DataBind();
DropDownList2division.Items.Insert(0, "-Select Division-");
}
private void Casualleave()
{
}
private void sickleave()
{
lblsick.Text = dt.Rows[0]["lev_day"].ToString();
}
public void Uploadimage()
{
string filename = "";
if (memberimg.HasFile)
{
filename = SaveFile(memberimg.PostedFile);
}
else
{
filename = "n/a";
}
if (filename != "n/a")
{
newsImage = filename;
}
}
public string SaveFile(HttpPostedFile file)
{
string fileName = "";
fileName = memberimg.FileName;
byte[] fileSize = memberimg.FileBytes;
string fileType = memberimg.PostedFile.ContentType;
try
{
if (System.IO.File.Exists(pathToCheck))
{
int counter = 2;
while (System.IO.File.Exists(pathToCheck))
{
fileName = tempfileName;
}
else
{
savePath += fileName;
memberimg.SaveAs(savePath);
}
catch (Exception e)
{
string errmsg = e.Message;
}
return fileName;
}
protected string Values;
protected void Button1_Click(object sender, EventArgs e)
{
string filename = Path.GetFileName(memberimg.PostedFile.FileName);
memberimg.SaveAs(Server.MapPath("images/" + filename));
con.Open();
String qry = "insert into IEmpTable( title, f_name, l_name, gender, dob,
marital_status, nationality, contact, email, div_id, dept_id, desig_id, add1, add2,
add3, add_city, add_state, add_district, add_pin, add_proof, qualification,
certification, work_exp, prev_company, position, year_exp, status,to_date,
doj,Casual_Leave,sick_Leave) values('" + DropDownList1title.SelectedItem.ToString() +
"','" + txt_fname.Text.Trim() + "','" + txt_lastname.Text.Trim() + "','" +
RadioButtonList1gender.SelectedValue.ToString() + "','" + txt_dob.Text.Trim() + "','"
+ RadioButtonList1.SelectedValue.ToString() + "','" + txt_natinality.Text.Trim() +
"','" + txt_contact.Text.Trim() + "','" + txt_email.Text.Trim() + "','" +
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(),
"alert", "alert('registration sucessfully');", true);
}
protected void DropDownList2division_SelectedIndexChanged(object sender, EventArgs
e)
{
string query = "select dept_id, dept_name, div_id from dbo.IDepartmentMaster
where div_id='"+DropDownList2division.SelectedValue.ToString()+"' ";
SqlDataAdapter da = new SqlDataAdapter(query, strConnString);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
DropDownList4department.DataSource = dt;
DropDownList4department.DataTextField = "dept_name";
DropDownList4department.DataValueField = "dept_id";
DropDownList4department.DataBind();
}
}
static string workexperinace;
protected void RadioButton1workexperinace_CheckedChanged(object sender, EventArgs
e)
{
if (RadioButton1workexperinace.Checked == true)
{
UpdatePanel1.Visible = false;
RadioButton2.Checked = false;
RadioButton1workexperinace.Checked = true;
workexperinace="Fresher";
}
}
editemp.aspx code:
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content-wrapper" style="margin-top:-900px;">
<!-- Content Header (Page header) -->
<section class="content-header" >
<h1>
Edit Employee Detail
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Employee Management</a></li>
<li class="active">Edit Employee Detail</li>
</ol>
</section>
style="width:200px;border:groove;"
onselectedindexchanged="ddl_empid_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
</asp:TemplateField>
<asp:TemplateField HeaderText="First Name" >
<ItemTemplate>
<asp:Label ID="lblFirstName" runat="server" Text='<%#
Eval("f_name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txt_fname" runat="server" Text='<%#
Eval("f_name") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderText="Department" >
<ItemTemplate>
<asp:Label ID="lbldepartment" runat="server" Text='<%#
Eval("dept_name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Specify Reason for Inactive" >
<ItemTemplate>
<asp:Label ID="lbfrmdate" runat="server" Text='<%#
Eval("temp_reason") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txt_temp" runat="server" Text='<%#
Eval("temp_reason") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>--%>
</div>
</div>
</div>
<!-- /.box-footer-->
</div>
<!-- /.box -->
</section>
<!-- /.content -->
</div>
</asp:Content>
editemp.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;
ddl_empid.DataSource = dt;
ddl_empid.DataTextField = "emp_id";
ddl_empid.DataValueField = "emp_id";
ddl_empid.DataBind();
ddl_empid.Items.Insert(0, "--Select-EmpID--");
}
protected void ddl_empid_SelectedIndexChanged(object sender, EventArgs e)
{
gvImage.DataSource = null;
string query = "select des.desig_name ,div.div_name ,dm.dept_name, et.emp_id,
et.title, et.f_name, et.l_name, et.gender, et.dob, et.marital_status, nationality,
contact, et.email, et.add1, et.add2, et.add3, et.add_city, et.add_state,
et.add_district, et.add_pin, et.add_proof, et.qualification, et.certification,
et.work_exp, et.prev_company, et.position, et.year_exp, et.status, et.s_inact,
et.per_reason, et.temp_reason, et.from_date, et.to_date, et.doj from IEmpTable as
et inner join dbo.IDepartmentMaster as dm on dm.dept_id=et.dept_id inner join
dbo.IDivisionMaster as div on div.div_id=et.div_id inner join dbo.IDesignationMaster
as des on des.desig_id=et.desig_id where et.emp_id='" +
ddl_empid.SelectedItem.ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(query, connStr);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
gvImage.DataSource = dt;
gvImage.DataBind();
}
protected void ImageData()
{
con = new SqlConnection(connStr);
con.Open();
da = new SqlDataAdapter("select des.desig_name ,div.div_name ,dm.dept_name,
et.emp_id, et.title, et.f_name, et.l_name, et.gender, et.dob, et.marital_status,
nationality, contact, et.email, et.add1, et.add2, et.add3, et.add_city,
et.add_state, et.add_district, et.add_pin, et.add_proof, et.qualification,
et.certification, et.work_exp, et.prev_company, et.position, et.year_exp,
et.status, et.s_inact, et.per_reason, et.temp_reason, et.from_date, et.to_date,
et.doj from IEmpTable as et inner join dbo.IDepartmentMaster as dm on
dm.dept_id=et.dept_id inner join dbo.IDivisionMaster as div on div.div_id=et.div_id
inner join dbo.IDesignationMaster as des on des.desig_id=et.desig_id", con);
ds = new DataSet();
}
// update event
protected void gvImage_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//find image id of edit row
string imageId = gvImage.DataKeys[e.RowIndex].Value.ToString();
// find values for update
TextBox add1 = (TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_one");
TextBox add2 = (TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_two");
TextBox txt_three =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_three");
TextBox txt_city = (TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_city");
TextBox txt_satate =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_satate");
TextBox txt_district =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_district");
TextBox txt_pin = (TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_pin");
TextBox txt_contact =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_contact");
TextBox txt_qualification =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_qualification");
TextBox txt_certification =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_certification");
DropDownList ddlstatus =
(DropDownList)gvImage.Rows[e.RowIndex].FindControl("DropDownList1");
DropDownList reason =
(DropDownList)gvImage.Rows[e.RowIndex].FindControl("DropDownList2");
FileUpload FileUpload1 =
(FileUpload)gvImage.Rows[e.RowIndex].FindControl("FileUpload1");
con = new SqlConnection(connStr);
string path = "Images/";
if (FileUpload1.HasFile)
{
path += FileUpload1.FileName;
//save image in folder
FileUpload1.SaveAs(MapPath(path));
}
else
{
// use previous user image if new image is not changed
Image img = (Image)gvImage.Rows[e.RowIndex].FindControl("img_user");
path = img.ImageUrl;
}
SqlCommand cmd = new SqlCommand("update IEmpTable set add1='" + add1.Text +
"', add2='" + add2.Text + "',add3='" + txt_three.Text + "',add_city='" + txt_city.Text
+ "',add_state='" + txt_satate.Text + "',add_district='" + txt_district.Text.Trim() +
"',add_pin='" + txt_pin.Text + "',qualification='" + txt_qualification.Text +
i) Salary Register:
ASReg.aspx code:
return false;
return true;
}
function noSpace(obj) {
obj.value = obj.value.replace(/\s/g, "");
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content-wrapper" style="margin-top:-900px;">
<div class="form-group">
<table>
<div class="form-group">
<asp:Label
ID="lbl_empid" runat="server" class="col-md-2 control-label" Text="Employee
ID"></asp:Label>
<div class="col-md-10">
<asp:DropDownList
ID="ddl_empid" runat="server" CssClass="form-control"
style="width:200px;border:groove;"
onselectedindexchanged="ddl_empid_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
</div>
</div>
</td>
<div class="form-group">
<asp:Label
ID="lbl_empname" runat="server" class="col-md-2 control-label" Text="Employee
Name"></asp:Label>
<div class="col-md-10">
<asp:TextBox
ID="txt_empname" runat="server" ReadOnly="true" class="form-control"
style="width:300px;border:groove;" >
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_division" runat="server" Text="Division" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_division" runat="server" ReadOnly="true" class="form-control"
placeholder="Division non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
<td>
<div class="form-group"
style="width:600px;">
<div class="col-sm-7">
<asp:TextBox
ID="txt_department" runat="server" ReadOnly="true" class="form-control"
placeholder="Department non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_designation" runat="server" Text="Designation" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_designation" runat="server" ReadOnly="true" class="form-control"
placeholder="Designation non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_sal" runat="server" Text="Enter Monthly Salary" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_sal" runat="server" required="required"
class="form-
control" placeholder="Monthly salary"
style="width:300px;border:groove;" ontextchanged="txt_sal_TextChanged"
AutoPostBack="true" onkeypress="return validate(event);">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div> <!-- panel-body -->
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_da" runat="server"
Text="Dearness Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_da" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_hra" runat="server"
Text="House Rent Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_hra"
runat="server" class="form-control" ReadOnly="true"
style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_ca" runat="server"
Text="Conveyance Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_ca" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_ma" runat="server"
Text="Medical Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_ma" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_te" runat="server"
Text="Total Earning" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_te" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
</div><!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col-->
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_ded" runat="server"
Text="Total Deduction" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_ded"
runat="server" class="form-control" ReadOnly="true"
style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
</div> <!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col -->
</div>
</div> <!-- End row -->
</div>
<div class="col-sm-2">
</div>
</div>
</div> <!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col -->
</div> <!-- End row -->
</div>
</div>
</asp:Content>
ASReg.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
empid();
ddl_empid.DataSource = dt;
ddl_empid.DataTextField = "emp_id";
ddl_empid.DataValueField = "emp_id";
ddl_empid.DataBind();
ddl_empid.Items.Insert(0, "--Select-EmpID--");
}
protected void ddl_empid_SelectedIndexChanged(object sender, EventArgs e)
{
}
double salary, totalerning, netpay;
protected void txt_sal_TextChanged(object sender, EventArgs e)
{
salary = double.Parse(txt_sal.Text.Trim());
double bp = salary*0.50;
txt_bp.Text = bp.ToString();
double da = salary * 0.07;
txt_da.Text = da.ToString();
double hr = salary * 0.20;
txt_hra.Text = hr.ToString();
double ea = salary * 0.06;
txt_ea.Text = ea.ToString();
}
}
}
j) Revise Salary:
Revisesalary.aspx code:
>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-body">
<div class="form-group">
<table>
<tr>
<td style="width :450px;">
<div class="form-group">
<asp:Label
ID="lbl_empid" runat="server" class="col-md-2 control-label" Text="Employee
ID"></asp:Label>
<div class="col-md-10">
<asp:DropDownList
ID="ddl_empid" runat="server" CssClass="form-control"
style="width:200px;border:groove;"
onselectedindexchanged="ddl_empid_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
</div>
</div>
<div class="form-group">
<asp:Label
ID="lbl_empname" runat="server" class="col-md-2 control-label" Text="Employee
Name"></asp:Label>
<div class="col-md-10">
<asp:TextBox
ID="txt_empname" runat="server" ReadOnly="true" class="form-control"
style="width:300px;border:groove;" >
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_division" runat="server" Text="Division" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_division" runat="server" ReadOnly="true" class="form-control"
placeholder="Division non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_department" runat="server" Text="Department" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-7">
<asp:TextBox
ID="txt_department" runat="server" ReadOnly="true" class="form-control"
placeholder="Department non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_designation" runat="server" Text="Designation" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_designation" runat="server" ReadOnly="true" class="form-control"
placeholder="Designation non-editable" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group"
style="width:600px;">
<asp:Label
ID="lbl_sal" runat="server" Text="Enter Monthly Salary" class="col-md-2 control-
label"></asp:Label>
<div class="col-sm-
10">
<asp:TextBox
ID="txt_sal" runat="server" required="required"
class="form-
control" placeholder="Monthly salary"
style="width:300px;border:groove;" ontextchanged="txt_sal_TextChanged"
AutoPostBack="true">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div> <!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col -->
</div> <!-- End row -->
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_da" runat="server"
Text="Dearness Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_da" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_hra" runat="server"
Text="House Rent Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_hra"
runat="server" class="form-control" ReadOnly="true"
style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_ea" runat="server"
Text="Entertainment Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_ea" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_ca" runat="server"
Text="Conveyance Allowance" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_ca" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group" style="width:600px;">
<asp:Label ID="lbl_te" runat="server"
Text="Total Earning" class="col-md-2 control-label"></asp:Label>
<div class="col-sm-10">
<asp:TextBox ID="txt_te" runat="server"
class="form-control" ReadOnly="true" style="width:300px;border:groove;">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
</div><!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col-->
</div>
</div>
</td>
</tr>
</div>
</div>
</td>
</tr>
</table>
</div>
</div> <!-- panel-body -->
</div> <!-- panel -->
</div> <!-- col -->
</div>
</div> <!-- End row -->
</div>
<div class="col-md-4">
</div>
</div> <!-- panel-body -->
</div> <!-- panel -->
Revisesalary.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
empid();
}
}
ddl_empid.DataSource = dt;
ddl_empid.DataTextField = "emp_id";
ddl_empid.DataValueField = "emp_id";
ddl_empid.DataBind();
}
protected void ddl_empid_SelectedIndexChanged(object sender, EventArgs e)
{
string query = "select sa.modified_date ,sa.monthly_salary,
sa.bp,sa.convy_allownc,sa.create_date,sa.dr_allownc,sa.en_allownc,sa.hra_allownc,sa.me
d_allownc,sa.monthly_salary,sa.net_pay,sa.pf,sa.tot_ded,sa.tot_earn,des.desig_name
,div.div_name ,dm.dept_name, et.emp_id, et.title, et.f_name, et.l_name, et.gender,
et.dob, et.marital_status, nationality, contact, et.email, et.add1, et.add2,
et.add3, et.add_city, et.add_state, et.add_district, et.add_pin, et.add_proof,
et.qualification, et.certification, et.work_exp, et.prev_company, et.position,
et.year_exp, et.status, et.s_inact, et.per_reason, et.temp_reason, et.from_date,
et.to_date, et.doj from IEmpTable as et inner join dbo.IDepartmentMaster as dm on
dm.dept_id=et.dept_id inner join dbo.IDivisionMaster as div on div.div_id=et.div_id
inner join dbo.IDesignationMaster as des on des.desig_id=et.desig_id inner join
ISalaryRegTable as sa on sa.emp_id=et.emp_id where et.emp_id='" +
ddl_empid.SelectedItem.ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(query, strConnString);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
txt_te.Text = dt.Rows[0]["tot_earn"].ToString();
txt_pf.Text = dt.Rows[0]["en_allownc"].ToString();
txt_ded.Text = dt.Rows[0]["pf"].ToString();
txt_np.Text = dt.Rows[0]["net_pay"].ToString();
txt_bp.Text = dt.Rows[0]["bp"].ToString();
txt_da.Text = dt.Rows[0]["dr_allownc"].ToString();
lblmodify.Text = dt.Rows[0]["modified_date"].ToString();
}
}
double salary, totalerning, netpay;
protected void txt_sal_TextChanged(object sender, EventArgs e)
{
k) Export to Excel:
Export-to-Excel.aspx code:
<div
class="form-horizontal" >
<table>
<tr>
<td >
<div class="form-group">
<div class="col-md-10">
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group">
<div class="col-md-10">
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="col-sm-10">
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-group">
<div class="col-sm-10">
</asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 col-
xs-12">
<div style="overflow:scroll">
<asp:GridView ID="GridView2"
runat="server">
</asp:GridView>
</asp:TemplateField>
<asp:TemplateField HeaderText="Casual_Leave_Taken" >
<ItemTemplate>
<asp:Label ID="lblcasultaken" runat="server"
Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Available_casual_Leave" >
<ItemTemplate>
<asp:Label ID="casulleaveavl" runat="server" Text='<%#
Eval("Casual_Leave") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sick_Leave_Taken" >
<ItemTemplate>
<asp:Label ID="lblsickleave" runat="server"
Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Available_Sick_Leave" >
<ItemTemplate>
<asp:Label ID="sickleaveavl" runat="server" Text='<%#
Eval("sick_Leave") %>'></asp:Label>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<asp:Button ID="btnExport" runat="server" Text="Export To Excel" OnClick =
"ExportToExcel" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Department" >
<ItemTemplate>
<asp:Label ID="lbldepartment" runat="server" Text='<%#
Eval("dept_name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderText="month" >
<ItemTemplate>
<asp:Label ID="month" runat="server" Text='<%#
Eval("month") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="days" >
<ItemTemplate>
<asp:Label ID="lbldays" runat="server" Text='<%#
Eval("days") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="wdays" >
<ItemTemplate>
<asp:Label ID="wdays" runat="server" Text='<%#
Eval("wdays") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total Number Of Days Present" >
<ItemTemplate>
<asp:Label ID="totalworking" runat="server"
Text=""></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>--%>
</div>
</div>
</div>
</div><!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end row -->
Export-to-Excel.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Globalization;
using System.Drawing;
using System.IO;
ImageData();
GridView2.Visible = false;
for (int i = 2013; i <= 2020; i++)
{
ddlYear.Items.Add(i.ToString());
}
ddlYear.Items.FindByValue(System.DateTime.Now.Year.ToString()).Selected =
true; //set current year as selected
//Fill Months
// lstTech.DataSource = dt;
// lstTech.DataTextField = "lev_type";
// lstTech.DataValueField = "lev_day";
// lstTech.DataBind();
// }
//}
public void FillDays()
//Fill days
ddlDay.Items.Add(noofdays.ToString());
//ddlDay.Items.FindByValue(System.DateTime.Now.Day.ToString()).Selected =
true;// Set current date as selected
}
protected void ddlYear_SelectedIndexChanged(object sender, EventArgs e)
{
FillDays();
}
protected void ddlMonth_SelectedIndexChanged(object sender, EventArgs e)
{
FillDays();
}
private void empid()
{
GridView2.DataSource = dt;
GridView2.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
string qrys = "select month from dbo.tbl_attendance where month='" +
ddlMonth.SelectedItem.ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(qrys, connStr);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(),
"alert", "alert('Attendence Already Created...');", true);
ImageData();
}
else
{
foreach (GridViewRow row in GridView2.Rows)
{
ImageData();
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(),
"alert", "alert('Added sucessfully');", true);
}
}
protected void ImageData()
{
con = new SqlConnection(connStr);
con.Open();
da = new SqlDataAdapter("select et.Casual_Leave,et.sick_Leave,
tbl_attendance.year,tbl_attendance.month,dbo.tbl_attendance.days,tbl_attendance.wdays,
des.desig_name ,div.div_name ,dm.dept_name, et.emp_id, et.title, et.f_name, et.l_name,
et.gender, et.dob, et.marital_status, nationality, contact, et.email, et.add1,
et.add2, et.add3, et.add_city, et.add_state, et.add_district, et.add_pin,
et.add_proof, et.qualification, et.certification, et.work_exp, et.prev_company,
et.position, et.year_exp, et.status, et.s_inact, et.per_reason, et.temp_reason,
et.from_date, et.to_date, et.doj from IEmpTable as et inner join
dbo.IDepartmentMaster as dm on dm.dept_id=et.dept_id inner join dbo.IDivisionMaster as
div on div.div_id=et.div_id inner join dbo.IDesignationMaster as des on
des.desig_id=et.desig_id LEFT JOIN dbo.tbl_attendance on
dbo.tbl_attendance.empid=et.emp_id ", con);
ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
l) Upload Attendance:
Importexcelto.aspx code:
<div class="row">
<div class="col-md-4">
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</section>
<!-- /.content -->
</div>
</asp:Content>
Importexcelto.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Configuration;
string consString =
ConfigurationManager.ConnectionStrings["hms"].ConnectionString;
using (SqlConnection con = new SqlConnection(consString))
{
using (SqlBulkCopy sqlBulkCopy = new SqlBulkCopy(con))
{
//Set the database table name
sqlBulkCopy.DestinationTableName = "dbo.Attendancupdate_master";
con.Open();
sqlBulkCopy.WriteToServer(dt);
con.Close();
Response.Write("<script>alert('Data Insert
Suseesfully')</script>");
}
}
}
catch (Exception ex)
{
m) Edit Attendance:
EditAttendance.aspx code:
<div class="row">
<div class="col-md-4">
</section>
<!-- /.content -->
</div>
</asp:Content>
EditAttendance.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
empid = Request.QueryString["Codes"].ToString();
lblempid.Text = empid.ToString();
empattendance();
txt_workingdays.Text = dt.Rows[0]["Working_Days"].ToString();
txtpresent.Text = dt.Rows[0]["Total_Number_Of_Days_Present"].ToString(); ;
txtcasul.Text = dt.Rows[0]["Casual_Leave_Taken"].ToString(); ;
txtsick.Text = dt.Rows[0]["Sick_Leave_Taken"].ToString(); ;
n) Payroll processing:
PayrollProcessing.aspx. code:
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content-wrapper" style="margin-top:-900px;">
<!-- Content Header (Page header) -->
<section class="content-header" >
<h1>
Payroll Processing Panel
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Payroll Processing</a></li>
<li class="active">Payroll Processing</li>
</ol>
</section>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Title" >
<ItemTemplate>
<asp:Label ID="lblImageName" runat="server" Text='<%#
Eval("title") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txt_Name" runat="server" Text='<%#
Eval("title") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="First Name" >
<ItemTemplate>
<asp:Label ID="lblFirstName" runat="server" Text='<%#
Eval("Fnane") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txt_fname" runat="server" Text='<%#
Eval("Fnane") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderText="Department" >
<ItemTemplate>
<asp:Label ID="lbldepartment" runat="server" Text='<%#
Eval("Department") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total_Days" >
<ItemTemplate>
<asp:Label ID="lblthree" runat="server" Text='<%#
Eval("Total_Days") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Working_Days" >
<ItemTemplate>
<asp:Label ID="lblworkingdays" runat="server" Text='<%#
Eval("Working_Days") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderStyle-Width="150px">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<script type="text/javascript">
function openWindow(code) {
window.open('payslip.aspx?Code=' + code, 'open_window', '
width=640, height=480, left=0, top=0');
}
</script>
<script type="text/javascript">
function openWindows(code1) {
window.open('EditAttendance.aspx?Codes=' + code1,
'open_window', ' width=640, height=480, left=0, top=0');
}
</script>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
</section>
<!-- /.content -->
</div>
</asp:Content>
PayrollProcessing.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Configuration;
using System.Drawing;
}
else
{
(e.Row.FindControl("lbltitle12") as Label).ForeColor = Color.Red;
}
}
// edit event
protected void gvImage_RowEditing(object sender, GridViewEditEventArgs e)
{
gvImage.EditIndex = e.NewEditIndex;
ImageData();
}
protected void OnPaging(object sender, GridViewPageEventArgs e)
{
ImageData();
gvImage.PageIndex = e.NewPageIndex;
gvImage.DataBind();
}
// update event
protected void gvImage_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//find image id of edit row
string imageId = gvImage.DataKeys[e.RowIndex].Value.ToString();
// find values for update
TextBox txt_presentday =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_presentday");
TextBox txt_causul =
(TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_causul");
TextBox txt_sick = (TextBox)gvImage.Rows[e.RowIndex].FindControl("txt_sick");
}
// cancel edit event
protected void gvImage_RowCancelingEdit(object sender, GridViewCancelEditEventArgs
e)
{
gvImage.EditIndex = -1;
ImageData();
}
//delete event
protected void gvImage_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
GridViewRow row = (GridViewRow)gvImage.Rows[e.RowIndex];
ImageData();
}
o) Payslip:
payslip.aspx code:
function CallPrint(strid) {
var prtContent = document.getElementById(strid);
var WinPrint = window.open('', '',
'left=0,top=0,width=1050,height=600,toolbar=1,scrollbars=1,status=0,menubar=1');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
document.getElementById('PlaceHolder1').visble = false;
// prtContent.innerHTML=strOldOne;
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="content-wrapper" style="margin-top:-900px;">
<!-- Content Header (Page header) -->
<section class="content-header" >
<h1>
Payslip
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Payslip</a></li>
<li class="active">Payslip</li>
</ol>
</section>
<center> <h2><b>Payslip</b></h2></center>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Basic Pay</td>
<td><asp:Label ID="lblbasic" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Dearness Allowance</td>
<td><asp:Label ID="lblda" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>House Rent Allowance</td>
<td><asp:Label ID="lblha" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Entertainment Allowance</td>
<td><asp:Label ID="lblea" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Conveyance Allowance</td>
<td><asp:Label ID="lblca" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Medical Allowance</td>
<td><asp:Label ID="lblma" runat="server" Text=""></asp:Label></td>
</tr>
</table>
</td>
<td valign="top">
<table border="1px" width="100%">
<tr>
<td colspan="2"><center><b>Deduction</b></center></td>
</tr>
<tr>
<td>Provident Fund</td>
<td><asp:Label ID="lblpf" runat="server" Text=""></asp:Label></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr> <td colspan="2">
</td></tr>
</table>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<asp:Button class="btn btn-info" runat="server" Text="Print" ID="btnPrint"
OnClientClick="CallPrint('print_Grid')"/>
</div>
<!-- /.box-footer-->
</div>
<!-- /.box -->
</section>
<!-- /.content -->
</div>
</asp:Content>
Payslip.aspx.cs code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
string id = Request.QueryString["Code"].ToString();
data();
}
}
private void data()
{
lblid.Text = dt.Rows[0]["empid"].ToString();
lblname.Text = dt.Rows[0]["Fnane"].ToString();
lbldivision.Text = dt.Rows[0]["Desgination"].ToString();
lbldepartment.Text = dt.Rows[0]["Department"].ToString();
lbldesgination.Text = dt.Rows[0]["Desgination"].ToString();
lblbasic.Text = dt.Rows[0]["bp"].ToString();
lblda.Text = dt.Rows[0]["dr_allownc"].ToString();
lblha.Text = dt.Rows[0]["hra_allownc"].ToString();
lblea.Text = dt.Rows[0]["en_allownc"].ToString();
lblca.Text = dt.Rows[0]["convy_allownc"].ToString();
lblma.Text = dt.Rows[0]["med_allownc"].ToString();
lblpf.Text = dt.Rows[0]["pf"].ToString();
lbtoatl.Text = dt.Rows[0]["net_pay"].ToString();
double perday = double.Parse(dt.Rows[0]["net_pay"].ToString())/30;
double totalp = double.Parse(dt.Rows[0]
["Total_Number_Of_Days_Present"].ToString());
double totalpay = totalp*perday;
Label6.Text = value.ToString();
}
}
8. TESTING
All the modules that have been developed before are integrated or put together
in this phase, and tested as a complete system.
9. IMPLEMENTING BI
With the help of the project BI for HR Planning we allow the organisation
to have a brief analysis about the minimum requirements to supply the
resources to run the project going on within the organisation.
We can analyse:
In simple words, managing the resources with the projects to drive the
organisation , but this need to go with several other projects as such that
could be providing most of the benefits for the organisation.
We have to revise the trend as and when possible so that the business
group could easily look into the revenue generation.
Analyze: Data Mining has always been easy to use. Now it's even
better with the addition of important new algorithms, including
Association Rules, Time Series, Regression Trees, Sequence
Clustering, Neural Nets, and Naïve Bayes.
For this project due to lack of time it is supposed to work with flatfile
data that will be fed into the the Power BI where filterations are done, a
kind of datawarehousing is performed to summerize the entile data as a
whole and the attractive BI Reports are generated.
10. REPORTS
This project will be complimented with few more ongoing projects that
will be centralized at the cloud and colud be used withnadvance
features.
Later on once the data will be fed into the fully developed centralized
system then the data will be taken directly from MS SQL Server
databases and few from available flatfiles (if required). Then data
warehousing will be performed with the use of Power BI with more
advanced filters to allow the Amin to have broader view of the entire
organization.
There are some limitations for the current system to which solutions can
be provided as a future development.
This system needs to be combined with further on going system that will
together allow the organization to earn benefits at large scale.
All the data are controlled by Admin only, but it is expected that with
advancement in the entire system various roles will be identified unded
Admin group with special permission rights for handling businesss data.
The system is limited just till the insertion of data and few functions but more
advanced features will be added to it , once all the modules are finalized and
combined with each other.
14. CONCLUSION
Not only they helped to gain knowledge about project but also to
analyze the problems and try to find solutions for that.
Secondly, in order to generate the final report, all the steps of database
designing and system analysis were meticously followed. This
strengthened my ideas on the topic. The objective of the project is to
enable the paperless communication and also make the entire working
of Jean Martin Systems India Pvt. Ltd. fully automated. I got practical
experience of working on a large project and it has given me a chance to
put into practice of the website development and many more concepts
that I have only been studied in theories.
Last but not the least I would like to thank all those who gave this
opportunity to accomplish this project.
15. REFERENCES
https://en.wikipedia.org/wiki/Business_intelligence
http://www.d2demand.com/mfhblog/4-key-functions-of-business-intelligence
https://yourbusiness.azcentral.com/role-human-resource-planning-
organizational-success-14220.html
https://bizfluent.com/info-7750696-functions-human-resource-planning.html
https://www.tutorialspoint.com/asp.net/index.htm
https://www.w3schools.com/asp/default.asp
https://code.visualstudio.com/docs/languages/csharp
https://www.tutorialspoint.com/csharp/index.htm