Current File : /home/obabain/autoclutchess_obaba_in/viewproductgroup.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp" %>
            <%@page import="java.sql.ResultSet"%>
            <%@page import="java.sql.*,java.util.*"%>
            
            <%
             Statement st=con.createStatement();
            %>

 <!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>
<%@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"> 

 <style>
 table {
    border-collapse: collapse;
    border-spacing: ;
    width: 80%;
    border: 1px solid #ddd;
} 

th,td{
    text-align: left;
    padding: 16px;
} 

tr:nth-child(even) {
    background-color: #f2f2f2
}

.rrow {
   display:inline-block;
    clear: both;     
} 
 .center {
    margin: auto;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
} 
.hideform
 {
  display:none;
 }   
</style>  
<body>

  <form action="" method="post">
       <div class="row">
          <div class="col-md-6">
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                   <h3 class="panel-title">Product Group  View</h3>
                   <a style="background:;margin-top:-23px; " class="btn btn-success pull-right" href="product_group.jsp">Add New</a>
              </div>
              
  <div class="panel-body"> 
   
    <table class="table table-bordered">
    <thead>
      <tr class="success">
      <!--   -->
        <th>Sl No</th>
        <th>Product Group</th>
              <th>Edit</th> 
       <th>Delete</th>
      </tr>
    </thead>

     <%
       try
       {
    	   int zi=1;
        ResultSet rs = st.executeQuery("select * from ip_families");  
        while(rs.next())
        {
     %>
    
      <tbody>
         <tr>
          
         <%-- <td scope="col">
       <a href="edit_grade.jsp?id=<%=rs.getString("id")%>">  <span class="glyphicon glyphicon-remove"  ></span></a>
     </td>
        
         <td scope="col">
       <a href="delete_grade.jsp?id=<%=rs.getString("id")%>">  <span class="glyphicon glyphicon-remove"  ></span></a>
     </td>  --%>
   <%--   <td> <a href="edit_grade.jsp?Id=<%=rs.getString("id")%>" title="EDIT"> <span class="glyphicon glyphicon-pencil"></span></a>   </td>
    
    
        <td>  
      <a href="delete_grade.jsp?Id=<%=rs.getString("id")%>" title="DELETE" onclick = "if (! confirm('Are You Sure To Delete?')) {return false;}">
                       <span class="glyphicon glyphicon-remove"></span> </a>
                 </td>  --%>
                          
     <td scope="col">
         <%=zi %>
     </td>
     
       <td scope="col">
         <%=rs.getString("family_name") %>
     </td> 
      <td> <a href="editProductgroup.jsp?Id=<%=rs.getString("family_id")%>">   <span class="glyphicon glyphicon-edit"></span></a> </td>
<td> <a href="deleteProductGroup.jsp?Id=<%=rs.getString("family_id")%>"  onclick = "if (! confirm('Continue?')) { return false; }"> <span class="glyphicon glyphicon-remove"></span></a> </td> 
     
     
     
    </tbody> 
      <%
        zi++;}

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




<input type="button" value="Back" style="background:#204b58;" class="pull-left btn btn-info" onclick="goBack()">
<script>
function goBack() 
{
    window.history.back();
}
</script>

             </div> 
              
         </div> 
      </div>
   </div>

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