Current File : //home/obabain/khb_obaba_in/viewRawmaterial.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>

<%
Statement st=con.createStatement();
ResultSet rs=null;
String id=request.getParameter("id");
%>

<%@include file="master.jsp" %>
<style type="text/css">
.highlight-error {
  border-color: red;
}
</style>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="js/jquery-2.1.0.min.js"></script>

<!-- plugin tableEdit load -->
<script src="js/tableEdit-0.1.js"></script>

<!-- load plugin for element -->

<body>
<form method="post" id="contact" name="form1">
<section id="main">
<div class="container">
 <div class="row" style="width:110%">
    <div class="col-md-10" >
       <div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Components Details:</h3>
        </div>
            
       <div class="panel-body">
       
       <table class="table">
        <!-- <thead>
<tr>
<th>BOM No.</th>
<th>Product</th>
<th>Quantity</th>
<th>Unit</th>

</tr>
</thead> -->
<tbody>
       <% 
       rs=st.executeQuery("select tb.*,(select unit_name_plrl from ip_units where unit_id=tb.unit)un from bom_rawmaterial tb where type='F' and fg_id="+id+"");
       while(rs.next())
       {
       %>
       <tr>
       <td>
       <b>
     <%=rs.getString("product") %> ::
     
      <%=rs.getString("quantity") %> <%=rs.getString("unit") %></b></td>
       </tr>
   
       <tr>
       <td>
       <table id="myTable" class="table table-bordered">
       <thead>
<tr>
<th>Raw Material</th>
<th>Quantity</th>
<th>Unit</th>
<th>Edit</th>
</tr>
</thead>
<%
Statement st1=con.createStatement();
ResultSet rs1=st1.executeQuery("select tb.*,(select product_name from ip_products where product_id=tb.product)prod,(select unit_name_plrl from ip_units where unit_id=tb.unit)uni from bom_rawmaterial tb where type='R' and d1_id="+id+"");
while(rs1.next())
{
%>
<tbody>

<tr>

<td>
<%=rs1.getString("prod") %>
</td>
<td><%=rs1.getString("quantity") %></td>
<td><%=rs1.getString("uni") %></td>
<td><a class="glyphicon glyphicon-pencil" href="editbom.jsp?id=<%=rs1.getString("B_id")%>"></a></td>
<%-- <td><a href="deleteRowBOM.jsp?Id=<%=rs1.getString("B_id")%>" onclick = "if (! confirm('Continue?')) { return false; }"><i class='glyphicon glyphicon-trash'></i></a>
</td> --%>
</tr>

</tbody>
<%}%>

</table>
</td>
       </tr> 
       <%}%>
       </tbody>
       </table>

<script>
function myFunction() {
    var x = document.getElementById("myDIV");
    if (x.style.display === "none") {
        x.style.display = "block";
    } else {
        x.style.display = "none";
    }
}
</script>
 </div> 
       
      <div class="modal-footer" id="contact_submit">
      
       
       <input type="button" value="Back" style="background:#204b58;" class="btn btn-info pull-left"  onclick="goBack()"/>
      <!-- <a class="btn btn-default" href="#"  style="margin-right:10px">Reset</a> -->
        <!--  <button type="submit" style="background:" class="" ></button>-->
      </div>
    
 </div>
    </div>
  </div>
</div>
</div> 
</section>
<%-- <% }else{ 
     response.sendRedirect("login.jsp");
    } %> --%>
 <script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
     <script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>  
   
 <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
 
</script>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>