Current File : /home/obabain/public_html/abc/mech_property_view (2).jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>
<%@ include file="Connection.jsp" %>
<%@include file="master.jsp"%>
<% String id=request.getParameter("Id");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<!-- <style>
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
</style> -->
<!-- <script src='https://code.jquery.com/jquery-3.3.1.js'></script>
<script src='https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js" charset="utf-8"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css"> -->
<style>
td,th
{
text-align:center
}
</style>
</head>
<body>
<form action="mechanical_DA.jsp">
<div class="row">
<div class="col-md-9" style="width:70%">
<div class="panel panel-default">
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Mechanical Property View</h3>
<a style="background:;margin-top:-23px; " class="btn btn-success pull-right" href="mech_property.jsp">Back</a>
<a style="background:;margin-top:-23px; " class="btn btn-success pull-right" href="mech_property.jsp">Add New</a>
</div>
<div class="panel-body">
<div style="overflow-x:auto;">
<table class="table table-bordered"> <!--table-striped style="margin-left:60px;" id="example" width:80%;height:40px; style="width:80%;height:-40px;"-->
<tr>
<th >Sl No</th>
<th >Material Grade</th>
<th >Created Date</th>
<th>Delete</th>
</tr>
<tbody>
<%
try
{
Statement st=con.createStatement();
int s1=1;
ResultSet rs = st.executeQuery("SELECT * FROM grade g inner join mech_property2 m where m.grade=g.id GROUP by m.grade");
while(rs.next())
{
%>
<tr>
<td scope="col">
<%=s1 %>
</td>
<td scope="col">
<a href="mech_propertyview2.jsp?id= <%=rs.getString("m.grade") %>"> <%=rs.getString("g.grade") %></a>
</td>
<td scope="col">
<%=rs.getString("c_date") %>
</td>
<td align="left"><a href="delete_mech_property.jsp?Id=<%=rs.getString("id")%>" onclick = "if (! confirm('Continue?')) { return false; }"><li class="glyphicon glyphicon-trash"></li></a></td>
<%
s1=s1+1;
}
}
catch (Exception e)
{
e.printStackTrace();
}
%>
</tbody>
</table>
</div>
<input type="button" value="Back" style="background:#204b58;" class="pull-left btn btn-info" onclick="goBack()">
<script>
function goBack()
{
window.history.back();
}
</script>
<br>
</div>
</div>
</div>
</div>
</form>
</body>
</html>