Current File : //home/obabain/public_html/abc/heat_treatment.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp" %>
           
             <%! String ab=null; %>
    <%  
    Statement st1=con.createStatement();
    String id=request.getParameter("Id");
    ResultSet rs=st1.executeQuery("select * from ip_products  where product_id="+id+"");
    while(rs.next())
    {
    ab=rs.getString("product_name");	
    }
    %>    
    
<!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" %>

<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">Heat Treatment Cycle</h3>
              </div>
              <div class="panel-body">
              
              
      <form action="" method="post">
            <div> 
              <a href="heat_view.jsp?Id=<%=id%>" style="margin-left:875px;" class="btn btn-primary">View</a>
            </div>
              
     <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Grade:&nbsp;</label></td>  
                <td><input type="text" name="grade" value="<%=ab%>" id="register_name" style="width:160px;margin-top:-1px;margin-left:50px;"/></td>
           </tr>     
     </table>
               
           <hr>     

  <!--  Container block  -->          
<div class="container">
 <div class="row">          
 
   <div class="column">     
    <div class="col-sm-3" style="margin-right:220px;">
               
             
             <h3>Solution Annealing</h3>  <br>
      <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Heat&nbsp;Upto:&nbsp;</label></td>  
                <td><input type="text" name="solution_heat" value="" id="register_name"  style="margin-left:25px;"></td>      <!-- style="width:160px;margin-top:-1px;" -->
           </tr> 
     </table>         
              <br>
              
              
     <table>                 <!-- Soaking Time: -->
        <tr>      
            <td class="tdLabel"><label for="" style="margin-left:70px">Soaking&nbsp;Time:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hours:</label></td>  
            <td><input type="text" name=solution_hour value="" id="register_name" style="width:60px;margin-top:-1px;"/></td>  <br>
        
            <td class="tdLabel"><label for="" style="margin-left:15px">Minutes:</label></td>  
            <td><input type="text" name="solution_min" value="" id="register_name" style="width:60px;height:25px;margin-top:-1px;"/></td>        
        </tr>         
     </table>          <br>
     
     <table>        <br>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Quench&nbsp;Media:</label></td>  
                <td><input type="text" name="solution_media" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
           </tr> 
     </table>        <br> 
        
             
    </div>      
   </div>             
    
    
    <div class="column">
    <div class="col-sm-3">         <!--  style="margin-right:130px;"  -->         
       
            <h3>Normalling</h3>  <br>
      <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Heat&nbsp;Upto:&nbsp;</label></td>  
                <td><input type="text" name="normalling_heat" value="" id="register_name"  style="margin-left:25px;"></td>      <!-- style="width:160px;margin-top:-1px;" -->
           </tr> 
     </table>         
              <br>
              
              
     <table>                 <!-- Soaking Time: -->
        <tr>      
            <td class="tdLabel"><label for="" style="margin-left:70px">Soaking&nbsp;Time:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hours:</label></td>  
            <td><input type="text" name="normalling_hours" value="" id="register_name" style="width:60px;margin-top:-1px;"/></td>  <br>
        
            <td class="tdLabel"><label for="" style="margin-left:15px" >Minutes:</label></td>  
            <td><input type="text" name="normalling_min" value="" id="register_name" style="width:60px;height:25px;margin-top:-1px;"/></td>        
        </tr>         
     </table>          <br>
     
     <table>        <br>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Quench&nbsp;Media:</label></td>  
                <td><input type="text" name="normalling_media" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
           </tr> 
     </table>     
     
     
    </div>
  </div>
  
  </div>
</div>                 <!-- container closed -->

<hr>                <br>

<div class="container">
 <div class="row">          
 
   <div class="column">     
    <div class="col-sm-3" style="margin-right:220px;">     
     <!--  Third Division -->       
             <h3>Annealing</h3>  <br>
      <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Heat&nbsp;Upto:&nbsp;</label></td>  
                <td><input type="text" name="annealing_heat" value="" id="register_name"  style="margin-left:25px;"></td>      <!-- style="width:160px;margin-top:-1px;" -->
           </tr> 
     </table>         
              <br>
              
              
     <table>                 
        <tr>      
            <td class="tdLabel"><label for="" style="margin-left:70px">Soaking&nbsp;Time:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hours:</label></td>  
            <td><input type="text" name="annealing_hour" value="" id="register_name" style="width:60px;margin-top:-1px;"/></td>  <br>
        
            <td class="tdLabel"><label for="" style="margin-left:15px">Minutes:</label></td>  
            <td><input type="text" name="annealing_min" value="" id="register_name" style="width:60px;height:25px;margin-top:-1px;"/></td>        
        </tr>         
     </table>          <br>
     
     <table>        <br>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Quench&nbsp;Media:</label></td>  
                <td><input type="text" name="annealing_media" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
           </tr> 
     </table>        <br> 
     
     
     </div>
    </div> 
     
     
     
     <div class="column">
    <div class="col-sm-3">  
       <!--  Fourth Division -->    
     <!-- <hr>  -->        
             <h3>Hardening</h3>  <br>
      <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Heat&nbsp;Upto:&nbsp;</label></td>  
                <td><input type="text" name="harden_heat" value="" id="register_name"  style="margin-left:25px;"></td>      <!-- style="width:160px;margin-top:-1px;" -->
           </tr> 
     </table>         
              <br>
              
              
     <table>                 
        <tr>      
            <td class="tdLabel"><label for="" style="margin-left:70px">Soaking&nbsp;Time:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hours:</label></td>  
            <td><input type="text" name="harden_hour" value="" id="register_name" style="width:60px;margin-top:-1px;"/></td>  <br>
        
            <td class="tdLabel"><label for="" style="margin-left:15px">Minutes:</label></td>  
            <td><input type="text" name="harden_min" value="" id="register_name" style="width:60px;height:25px;margin-top:-1px;"/></td>        
        </tr>         
     </table>          <br>
     
     <table>        <br>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Quench&nbsp;Media:</label></td>  
                <td><input type="text" name="harden_media" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
           </tr> 
     </table>        <br> 
     
    </div>
  </div>
  
  </div>
</div>  
     
     
      <!--  Fifth Division -->     
     <hr>         
             <h3>Tempering</h3>  <br>
      <table>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Heat&nbsp;Upto:&nbsp;</label></td>  
                <td><input type="text" name="temp_heat" value="" id="register_name"  style="margin-left:25px;"></td>      <!-- style="width:160px;margin-top:-1px;" -->
           </tr> 
     </table>         
              <br>
              
              
     <table>                 
        <tr>      
            <td class="tdLabel"><label for="" style="margin-left:70px">Soaking Time:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hours:</label></td>  
            <td><input type="text" name="temp_hour" value="" id="register_name" style="width:60px;margin-top:-1px;"/></td>  <br>
        
            <td class="tdLabel"><label for="" style="margin-left:15px" >Minutes:</label></td>  
            <td><input type="text" name="temp_min" value="" id="register_name" style="width:60px;height:25px;margin-top:-1px;"/></td>        
        </tr>         
     </table>          <br>
     
     <table>        <br>
            <tr>  
                <td class="tdLabel"><label for="" style="margin-left:80px">Quench Media:</label></td>  
                <td><input type="text" name="temp_media" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
           </tr> 
     </table>     
        


     <br><br>      

     <div class="modal-footer" id="contact_submit">
       <!-- <input type="button" value="Back" style="margin-right:650px" class="btn btn-primary" /> -->
       <a href="ViewProduct.jsp" style="margin-right:655px;" class="btn btn-primary">Back</a>
       <a class="btn btn-primary"  href="">Reset</a>      
       <button type="submit" class="btn btn-primary" >Save Changes</button>
     </div> 
  
  </form>
  
  
            <%
             String grade=request.getParameter("grade");
             String solution_heat=request.getParameter("solution_heat");
             String solution_hour=request.getParameter("solution_hour"); 
             String solution_min=request.getParameter("solution_min"); 
             
             String solution_media=request.getParameter("solution_media");
             String normalling_heat=request.getParameter("normalling_heat");
             String normalling_hours=request.getParameter("normalling_hours"); 
             String normalling_min=request.getParameter("normalling_min"); 
             
             String normalling_media=request.getParameter("normalling_media");
             String annealing_heat=request.getParameter("annealing_heat");
             String annealing_hour=request.getParameter("annealing_hour"); 
             String annealing_min=request.getParameter("annealing_min"); 
             
             String annealing_media=request.getParameter("annealing_media");
             String harden_heat=request.getParameter("harden_heat");
             String harden_hour=request.getParameter("harden_hour"); 
             String harden_min=request.getParameter("harden_min"); 
             
             String harden_media=request.getParameter("harden_media");
             
             String temp_heat=request.getParameter("temp_heat");
             String temp_hour=request.getParameter("temp_hour"); 
             String temp_min=request.getParameter("temp_min");
             String temp_media=request.getParameter("temp_media"); 
             
             %>

             <%
			  try
               {
    	        if(grade!=null ||grade.length()!=0)
    	         {
    	          Statement st=con.createStatement(); 
                  int i=st.executeUpdate("insert into heat_treatment(grade,solution_heat,solution_hour,solution_min,solution_media,normalling_heat,normalling_hours,normalling_min,normalling_media,annealing_heat,annealing_hour,annealing_min,annealing_media,harden_heat,harden_hour,harden_min,harden_media,temp_heat,temp_hour,temp_min,temp_media,product_id)values('"+grade+"','"+solution_heat+"','"+solution_hour+"','"+solution_min+"','"+solution_media+"','"+normalling_heat+"','"+normalling_hours+"','"+normalling_min+"','"+normalling_media+"','"+annealing_heat+"','"+annealing_hour+"','"+annealing_min+"','"+annealing_media+"','"+harden_heat+"','"+harden_hour+"','"+harden_min+"','"+harden_media+"','"+temp_heat+"','"+temp_hour+"','"+temp_min+"','"+temp_media+"','"+id+"')");
                  out.println("");
                  }
               }
               catch(Exception e)
               {
                System.out.print(e);
                e.printStackTrace();
               }   
			%> 
                         
             
              </div>
              <br><br><br><br><br>
            </div>
          </div>
        </div>
</body>
</html>