-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewemp.jsp
161 lines (129 loc) · 4.78 KB
/
Viewemp.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<%@page import="java.util.*"%>
<%@page import="dto.UserDTO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link href="plugins/datatables/dataTables.bootstrap1.css"
rel="stylesheet" type="text/css" />
<link href="plugins/datatables/dataTables.font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="plugins/datatables/dataTables.ionicons.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
function confirm_alert(node) {
return confirm("Do you want to delete this Employee?");
}
</script>
<%
int count = (Integer) session.getAttribute("count");
List<UserDTO> listOfEmp = (List<UserDTO>) session.getAttribute("listOfEmp");
%>
<div align="right">
<h3><a href=index.html >Log Out </a></h3>
</div>
<div class="col-xs-1" align="right">
<table>
<tr>
<td><b>Export As:-</b></td>
<td><a href="UserExcelReport.jsp?search_type=null&search=null"><img
alt="" src="dist/img/images1.jpg" title="EXCEL REPORT "
height="50" width="50"></a></td>
</tr>
</table>
</div>
<div align="center"><br> <font color="blue" > <h2><%=count%> Records Maintained!!</h2></font><br></div>
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr style="background-color: #566D60;">
<th><center>
<font color="white">Employee Id</font>
</center></th>
<th><center>
<font color="white">Username</font>
</center></th>
<th><center>
<font color="white">Gender</font>
</center></th>
<th><center>
<font color="white">City</font>
</center></th>
<th><center>
<font color="white">Email</font>
</center></th>
<th><center>
<font color="white">Phone No.</font>
</center></th>
<th><center>
<font color="white">Department</font>
</center></th>
<th><center>
<font color="white">Designation</font>
</center></th>
<th><center>
<font color="white">Attendance</font>
</center></th>
<th><center>
<font color="white">Image</font>
</center></th>
<th><center>
<font color="white">Edit</font>
</center></th>
<th><center>
<font color="white">Delete</font>
</center></th>
</tr>
</thead>
<tbody>
<%
UserDTO userDTO=null;
Iterator iterator=listOfEmp.iterator();
while(iterator.hasNext())
{
userDTO=(UserDTO)iterator.next();
%>
<tr>
<td><%=userDTO.getEmpId()%> </td>
<td><%=userDTO.getUsername()%> </td>
<td><%=userDTO.getGender()%> </td>
<td><%=userDTO.getCity()%> </td>
<td><%=userDTO.getEmail()%> </td>
<td><%=userDTO.getPhoneNo()%> </td>
<td><%=userDTO.getDepartment()%> </td>
<td><%=userDTO.getDesignation()%> </td>
<td><%=userDTO.getAttendance()%> </td>
<td><img src="uploads/<%=userDTO.getImage()%>" height="50" width="100" alt="image not available"></td>
<td>
<a href="EditEmp?empId=<%=userDTO.getEmpId()%>">
<img alt=""
src="dist/img/edit.png" height="50" width="50">
<center><i class="fa fa-edit"></i></center>
</a>
</td>
<td>
<a href="DeleteEmp?empId=<%=userDTO.getEmpId()%>"
onclick="return confirm_alert(this);">
<img alt=""
src="dist/img/del.png" height="50"width="50">
<center><i class='fa fa-trash'></i></center>
</a>
</td>
</tr>
<%
}
%>
</tbody>
</table>
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js" type="text/javascript"></script>
<script>
$(function () {
$("#example1").dataTable();
});
</script>
</body>
</html>