Current File : //home/obabain/public_html/abc/pattern_detailsView.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp"%>
  
<!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 type="text/css">
.rrow
{
 display: inline-block;
   margin: 30px;
}    
</style>
</head>
<%@include file="master.jsp" %>

 <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://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css">  -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css"> 

<body>
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
             <!--  <div class="panel-heading main-color-bg" style="background-color:green;color:#00FF00;height:40px;"> -->
              <div class="panel-heading" style="background-color:green;height:40px;"> 
                    <a class="btn btn-primary" href="pattern_details.jsp" style="margin-left:880px;margin-top:-7px;">Add New</a> 
              </div>
              
 <div class="panel-body">
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable();
} );
</script>  
<div style="overflow-x:auto;">
   <table class="table table-striped table-bordered" id="example">
    <thead>
      <tr class="success">
       <th>Order No</th>
        <th>Item Name/Part No</th>
        <th>Pattern By</th>
        <th>Methoding</th>
        <th>Item Pattern Type</th>
        <th>Edit</th>
        <th>Delete</th>
      </tr>
    </thead>
    <tbody>
    
    <%
       try
       {
    	Statement st=con.createStatement();
        ResultSet rs = st.executeQuery("select tb.*,(select product_name from ip_products where product_id=tb.item_name)item_name from pattern_details tb");  
        while(rs.next())
        {
     %>
    
      
  
   <tr>   
     <td scope="col">
         <%=rs.getString("order_no") %>
     </td>   
     <td scope="col">
         <%=rs.getString("item_name") %>
     </td>
     
     <td scope="col">
         <%=rs.getString("pattern_by") %>
     </td>

     <td scope="col">
        <%=rs.getString("methoding") %>
     </td>
     
     <td scope="col">
        <%=rs.getString("itempattern_type") %>
     </td>
    
     <td scope="col">        
       <a href="edit_pattern.jsp?id=<%=rs.getString("id")%>">   <span class="glyphicon glyphicon-edit"></span> </a>
     </td>
     
     <td scope="col">
       <a href="delete_pattern.jsp?id=<%=rs.getString("id")%>"> <span class="glyphicon glyphicon-remove"></span></a>
     </td>
 
   
      <%
        }
   
       }     
       catch (Exception e) 
       {
        e.printStackTrace();
       }
    %>
      
    </tbody>
  </table>
  </div>
   
    <br>
  <div class="modal-footer" id="contact_submit">
       <input type="button" value="Back" style="margin-right:620px" class="btn btn-primary pull-left" onclick="goBack()">
  </div> 
     
             
              </div>
              <br>
            </div>
          </div>
        </div>
 <script type="text/javascript">
  function goBack() 
  {
   window.history.back(); 
  };
</script>
</body>
</html>