Current File : /home/obabain/khb_obaba_in/mechanicalPview.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>
</head>

<body>
 <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                <h3 class="panel-title">Mechanical Property</h3>
              </div>
              <div class="panel-body">
 <a class="btn btn-primary" href="mechanicalproperty.jsp?Id=<%=id%>" style="margin-left:880px;">Add New</a>      
<br><br>
          
            <b>View Mechanical Property:</b>          
<div style="overflow-x:auto;">
  <table class="table table-bordered">
<tr>

<th>Sl No</th>
<th>Material Grade</th>

<th colspan="2">ASTM&nbsp;STD&nbsp;in&nbsp;&nbsp;&nbsp;&nbsp;<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;Min</th> 
<th colspan="2">Yield&nbsp;Strength&nbsp;in&nbsp;Mpa<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;Min</th>
<th colspan="2">Tensile&nbsp;Strength&nbsp;in&nbsp;MpaDate<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;&nbsp;Min</th>
<th colspan="2">Elongation(%)&nbsp;in&nbsp;mm<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;Min</th>
<th colspan="2">Reduction&nbsp;in&nbsp;Area%<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;Min</th>
<th colspan="2">Hardness&nbsp;in&nbsp;BHN<br><br>Max&emsp;&emsp;&emsp;&nbsp;&nbsp;Min</th>
<th colspan="2">Impact&nbsp;<br><br>Max&nbsp;&nbsp;&nbsp;&nbsp;Min</th>
</tr>
<tr>
 <%
       try
       {
    	Statement st=con.createStatement();
    	
    	ResultSet rs=st.executeQuery("select tb.*,(select product_name from ip_products where product_id=tb.product_id)grade from mechanical_property tb where product_id="+id+"");
        /* ResultSet rs = st.executeQuery("select * from mechanical_property");  */ 
        while(rs.next())
        {
     %>
    
     <!--  <tbody> -->
         <tr>
          
      <td scope="col">
         <%=rs.getString("id") %>
     </td>
         
     <td scope="col">
         <%=rs.getString("grade") %>
     </td>
     
     
     <td scope="col">
        <%=rs.getString("astm_max") %>
     </td>
     
      <td scope="col">
         <%=rs.getString("astm_min") %>
     </td>
     
     <td scope="col">
         <%=rs.getString("yield_max") %>
     </td>
         
     <td scope="col">
         <%=rs.getString("yield_min") %>
     </td>
     
       <td scope="col">
         <%=rs.getString("tensile_max") %>
     </td>

     <td scope="col">
        <%=rs.getString("tensile_min") %>
     </td>
     
      <td scope="col">
         <%=rs.getString("elongation_max") %>
     </td>
     
     <td scope="col">
         <%=rs.getString("elongation_min") %>
     </td>
         
     <td scope="col">
         <%=rs.getString("reduction_max") %>
     </td>
     
       <td scope="col">
         <%=rs.getString("reduction_min") %>
     </td>

     <td scope="col">
        <%=rs.getString("hardness_max") %>
     </td>
     
      <td scope="col">
         <%=rs.getString("hardness_min") %>
     </td>
     
     
     <td scope="col">
         <%=rs.getString("impact_max") %>
     </td>
     
      <td scope="col">
         <%=rs.getString("impact_min") %>
     </td>
  
    </tbody> 
      <%
        }

       } 
       catch (Exception e) 
       {
        e.printStackTrace();
       }
    %>
</table>
  </div>
 
    
<br>

  <a href="ViewProduct.jsp"  class="btn btn-primary">Back</a>   
<!-- <button class="btn btn-primary" onclick="goBack()">Back</button> -->

<script type="text/javascript">
  function goBack() 
  {
   window.history.back(); 
  };
</script>
</div>
</div>
</div>
</div>  



</body>
</html>