Current File : //home/obabain/khb_obaba_in/ProcessInspectionView2.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">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Insert title here</title>
</head>
<body>
<script>
function myFunction1(m_id) 
{
	var result = confirm("Are You Sure To Delete?");	
     if(result)
    	 {
    	 window.location.href = 'deleteprocessinspection.jsp?id=' + m_id;
    	 }
     else
    	 {
    	 window.location.href = 'ProcessInspectionView.jsp';
    	 }
}
</script>  
 <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                <h3 class="panel-title">Process Inspection Report (Sand Casting)</h3>
              </div>
              
              <div class="panel-body">

                    
<div style="overflow-x:auto;">
  <table class="table table-bordered">
<thead>
<!-- <tr class="success"> -->

<!--  -->
<!-- <th rowspan="2"><div align="center"><p><b>Weight</b></p></div></th> -->
<!-- <th  colspan=8><div align="center" ><p><b>Type of Rej</b></p></div></th> -->

<!-- <th rowspan="2" ><div align="center"><p><b>Reason for Rejection</b></p></div></th> -->
<!-- <th rowspan="2" colspan=2 ><div align="center"><p><b>Action</b></p></div></th> -->



<!-- </tr> -->
<tr class="success">

<!-- <th>
<div style="width:50px">
<p><b>Sl no</b></p></div>
</th> -->


<th><div style="width:100px"  >
<p><b>Heat no</b></p></div></th>
<th><div style="width:100px" >
<p><b>Part Name/no.</b></p></div></th>
<th><div style="width:100px" >
<p><b>Grade</b></p></div></th>
<!-- <th><div style="width:100px" > -->
<!-- <p><b>Qty poured</b></p></div></th> -->
<!-- <th><div style="width:100px" > -->
<!-- <p><b>Qty Acc</b></p></div></th> -->
<!-- <th><div style="width:100px" ><p><b>Qty Rej</b></p></div></th> -->
<!-- <th><div style="width:100px" ><p><b>Weight</b></p></div></th> -->
<%
String heat=request.getParameter("id");
System.out.println(heat);
String date="";
String heat1="";
String part="";
String grade="";
String pouring="";
String acc="";
String rej="";
String wt="";

int i=0;
Statement st1=con.createStatement();
ResultSet rs1 = st1.executeQuery("SELECT * FROM sand_processinspection where heat_no ='"+heat+"'");  
while(rs1.next())
{
	rs1.getString("heat_no");
	i++;
}
%>
 <th colspan=<%=i %>  ><div align="center" ><p><b>Type of Rej</b></p></div></th>

 <th  colspan=2 ><div align="center"><p><b>Action</b></p></div></th>

</tr>
</thead>
  
   <tbody>
    
    <%
       try
       {
    	Statement st=con.createStatement();
        ResultSet rs = st.executeQuery("SELECT * FROM sand_processinspection where heat_no='"+heat+"'");  
        while(rs.next())
        {
        	date=rs.getString("date");
        	heat1=rs.getString("heat_no");
        	part=rs.getString("part_name");
        	grade=rs.getString("grade");
        	pouring=rs.getString("qty_pouring");
        	acc=rs.getString("qty_acc");
        	rej=rs.getString("qty_rej");
        	wt=rs.getString("Weight");
        }
        	
     %>
 <tr>

 <td scope="col"> <%=heat1%></td>
 <td scope="col"> <%=part%></td>
  <td scope="col"> <%=grade%></td>
<%--  <td scope="col"> <%=pouring %></td> --%>
<%-- <td scope="col"> <%=acc%></td> --%>
<%--  <td scope="col">  <%=rej %> </td> --%>
<%--  <td scope="col"> <%=wt%></td> --%>
 <% 

Statement st3=con.createStatement();
ResultSet rs3 = st3.executeQuery("SELECT * FROM sand_processinspection where heat_no ='"+heat+"'");  
while(rs3.next())
{
	
	

%>
<td><%=rs3.getString("type_rej") %></td>
<%}
    %>

 <td><a href="Processinsepectionedit.jsp?id=  "><button type="button" class="btn btn-primary"  style="background-color: #293a15e3;" class="" ><i class="fa fa-edit" style="font-size:24px"></i></button></a>
  </td>   
<td><button style="background-color: #293a15e3;" class="btn btn-primary" onclick="myFunction1()"><i class="fa fa-trash" style="font-size:24px"></i></button>
  </td> 
     </tr>
      <%
  

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


<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>