Current File : /home/obabain/public_html/abc/mech_propertyview2.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");
System.out.println(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
}
#a1
{
color:red;
}
</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 >Properties</th>
<th >Max</th>
<th >Min</th>
<th >Impact</th>
<th >Micro-Structure</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<tbody>
<%
Statement st=con.createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM mech_properties m1 inner join mech_property2 m2 where m1.m_id=m2.properties and m2.grade="+id+"");
while(rs.next())
{
%>
<tr>
<td id="a1">
<%=rs.getString("m1.m_properties") %>
</td>
<td >
<%=rs.getString("m2.p_min") %>
</td>
<td >
<%=rs.getString("m2.p_max") %>
</td>
<td scope="col">
<%=rs.getString("m2.impact") %>
</td>
<td scope="col">
<%=rs.getString("m2.micro_structure") %>
</td>
<%-- <td align="left"> <a href="edit_mech_propertyview2.jsp?ID=<%=rs.getString("m2.id")%>&prop=<%=rs.getString("m1.m_id")%>&min=<%=rs.getString("m2.p_min") %>&max=<%=rs.getString("m2.p_max") %>&impact=<%=rs.getString("m2.impact") %>µ=<%=rs.getString("m2.micro_structure") %>" > <li class="glyphicon glyphicon-pencil"></li></a></td>
--%>
<td align="left"> <a href="Edit_mech_propertyview2.jsp?ID=<%=rs.getString("m2.id")%>&mid=<%=rs.getString("m_id") %>&pmin= <%=rs.getString("m2.p_min") %>&pmax=<%=rs.getString("m2.p_max") %>&impact=<%=rs.getString("m2.impact") %>µstructure= <%=rs.getString("m2.micro_structure") %>" > <li class="glyphicon glyphicon-pencil"></li></a></td>
<td align="left"><a href="Delete_mech_property1.jsp?Id=<%=rs.getString("id")%>" onclick = "if (! confirm('Continue?')) { return false; }"><li class="glyphicon glyphicon-trash"></li></a></td>
<%
}
%>
</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>