-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewAllVehicles.jsp
61 lines (59 loc) · 2.03 KB
/
viewAllVehicles.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
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,
java.util.*,
net.vehicle.*" errorPage="" %>
<%
ArrayList all = VehicleCommon.viewAllVehicles();
int size = all.size();
%>
<script>
function deleteVehicle(id){
if(confirm('Want to Delete this Vehicle Details?')){
window.location.href = 'do?MOD=MTN&ACT=vDel&vid='+id;
}
}
</script>
<div class="header">View All Vehicle Details </div><br/>
<h3>View all the Vehicle Details.<br/>If you want to add more Vehilce then <a href="do?MOD=MTN&ACT=VclAdd">Click Here.</a></h3><br/>
<%
int count =0;
for(int i=0;i<size;i++){
count=count+1;
ArrayList one=(ArrayList)all.get(i);
%>
<table width="90%" align="center" style="border:#D22929 solid 2px;padding:5px;" border="0" >
<tr>
<th colspan="3" scope="col"><div class="header">
<div align="left"> <%=count%>) <%=(String)one.get(1)%></div>
</div></th>
</tr>
<tr>
<td colspan="2"><strong>Number : </strong> <%=(String)one.get(2)%></td>
<td width="21%" rowspan="6"><img src="<%=(String)one.get(8)%>" width="220" height="120" /></td>
</tr>
<tr>
<td colspan="2"><strong>Make</strong> : <%=(String)one.get(3)%></td>
</tr>
<tr>
<td><strong>Fuel Type:</strong> <%=(String)one.get(4)%></td>
<td><strong>Cost : </strong><%=one.get(7)%> Rs.</td>
</tr>
<tr>
<td colspan="2"><strong>Vehicle Type: </strong><%=one.get(9)%></td>
</tr>
<tr>
<td><strong>Insurer :</strong> <%=one.get(10)%></td>
<td><strong>Company :</strong> <%=one.get(11)%></td>
</tr>
<tr>
<td width="36%"><strong>Driver Name :</strong> <%=(String)one.get(12)%></td>
<td width="43%"> </td>
</tr>
<tr>
<td>
<div align="center"><a href="do?MOD=MTN&ACT=editVehicle&vId=<%=(String)one.get(0)%>">Edit Vehicle</a> </div></td>
<td> <a href="javascript:deleteVehicle(<%=(String)one.get(0)%>)">Delete Vehicle</a></td>
<td> </td>
</tr>
</table>
<br/>
<% } %>