-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewEDept.html
73 lines (69 loc) · 2.3 KB
/
viewEDept.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
<title>View Employees Departmentwise</title>
<style>
table {
border: 1px solid black;
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 8px;
text-align: left;
}
</style>
</head>
<body>
<form action="/viewEDept" method="POST">
<div class="inputgroup">
<label for="input1">Enter the Branch Id: </label>
<input type="text" id="input1" name="input1" value="" onkeyup="this.setAttribute('value', this.value);"/>
</div>
<div class="inputgroup">
<label for="input2">Enter the Department Name: </label>
<input type="text" id="input2" name="input2" value="" onkeyup="this.setAttribute('value', this.value);"/>
</div>
<div class="submit">
<input type="submit" value="Submit">
</div>
</form>
{% if result %}
{% if result == "Data Not Found" %}
<p>Data Not Found</p>
{% else %}
<div class="answer">
<h1>Data</h1>
<table>
<tr>
<th>Employee ID</th>
<th>Branch Id</th>
<th>Name</th>
<th>Age</th>
<th>Phone No</th>
<th>Department</th>
<th>Salary</th>
</tr>
{% for row in result %}
<tr>
<td>{{ row[0] }}</td>
<td>{{ row[1] }}</td>
<td>{{ row[2] }}</td>
<td>{{ row[3] }}</td>
<td>{{ row[4] }}</td>
<td>{{ row[5] }}</td>
<td>{{ row[6] }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endif %}
<form action="/operations" method="POST">
<button type="submit" style="position: fixed; bottom: 0; right: 0; margin: 10px;">
Back to home</button>
</form>
</body>
</html>