Current File : /home/obabain/autoclutchess_obaba_in/Testcertificatecreation1.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
 <%@include file="master.jsp"%> 
 <%
 String id1=request.getParameter("id1");
 String id2=request.getParameter("id2");
 Statement st1=con.createStatement();
 
 ResultSet rs1=null;
 Statement st2=con.createStatement();
 
//  ResultSet rs2=null;
//  Statement st3=con.createStatement();
 
//  ResultSet rs3=null;
 
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <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://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!--  <link href="css/select2.min.css" rel="stylesheet"> -->
<!--   <link href="css/jquery.datetimepicker.css" rel="stylesheet"> -->
<!--     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<!--   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
<!--   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<!--    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.2/bootstrap3-typeahead.min.js"></script> -->
<!--   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
<!--   <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"  rel="stylesheet">
 --> 
<!--     <link href="css/select2.min.css" rel="stylesheet"> -->
<!--     <link href="css/jquery.datetimepicker.css" rel="stylesheet"> -->

<!--   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
<!-- <script src="js/jquery.datetimepicker.full.js"></script> -->

<!--  <link href="css/jquery.datetimepicker.css" rel="stylesheet"> -->
<!-- <link href="css/select2.min.css" rel="stylesheet"> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> -->
<!--   <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>   -->
<!--   <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>  -->
<!--  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  -->
<!--             <script>
    $('.select1').select2();
    </script> -->
<!--  <script>
	 $('.choice').hide();
	 var  total=0;
	$(document).ready(function(){		
	     $("#select").change(function(){
	        var textselected =  document.getElementById("select").value ;
	        //alert(textselected);
	            target = '.' + textselected;
	           // alert(target);
	         $('.choice').hide();
	        $(target).show();
	        var sum = 0;
	        var total = 0;
	       
	
    });
	});

	</script> -->
<!-- 	 <script>
    $('select').select2();
    </script> -->
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable();
} );
</script>
	<div class="row">
		<form action="TestCertificateDA2.jsp?id1=<%=id1%>&id2=<%=id2%>" method="post" id="contact" name="form1">
			<section id="main">
				<div class="container" >
					<div class="row">
						<div class="col-md-10">
							<div class="panel panel-default" style="width:1100px">
								<div class="panel-heading main-color-bg" >
									<h3 class="panel-title">Centrifugal Test certificate creation
									</h3>
										<a href="centrifugaltestcertificateview.jsp"><input type="button" value="view"class="btn btn-info pull-right" style="margin-top:-20px;"></a>
								</div>

								

								<div class="panel-body" >
								<div class="row" style="margin-top:30px">
							
							
								<div class="col-xs-2">
								<label>Tc No</label>
								<input type="text" value="" class="form-control" name="tcn">
								</div>
								<div class="col-xs-2">
								<label>Tc Date</label>
								<input type="date" value="" class="form-control" name="tdate">
								</div>
							
												<div class="col-xs-3">
								<label>Customer</label>
           <select class="select1 form-control"  id="campInput"  onchange="showState(this.value)"  name="cust" style="width:">     <!--  style="width:240px;height:50px;"   -->
								    <%
                 /* Statement st=con.createStatement(); */
                 ResultSet r1=st1.executeQuery("select * from ip_clients  ");
                 while(r1.next())
                 {	
               %>
                 <option value="<%=r1.getString("client_id")%>"> <%=r1.getString("client_name")%> </option>
                <% } %>
								</select>
								</div>
									<div class="col-xs-2">
								<label>Po No</label>
								<input type="text" value="" class="form-control" name="P_no">
								</div>
								</div>
								<div class="row" style="margin-top:30px" >
						
								
									<div class="col-xs-2">
								<label>Po Date</label>
								<input type="date" value="" class="form-control" name="p_date">
								</div>
								<div class="col-xs-2">
									<label>Invoice No</label>
								<input type="text" value="" class="form-control" name="n_no">
								</div>
											<div class="col-xs-2">
									<label>Invoice Date</label>
								<input type="date" value="" class="form-control" name="n_date">
								</div>
											<div class="col-xs-2">
									<label>Die No:</label>
								<input type="text" value="" class="form-control" name="die">
								</div>
											<div class="col-xs-2">
									<label>Size :</label>
								<input type="text" value="" class="form-control" name="size" placeholder="l*b*h">
								</div>
								</div>
								<div class="row" style="margin-top:30px">
								<div class="col-xs-3">
									<label>Heat Treatement  :</label>
								<textarea rows="4" cols="30" name="h_treat">
								</textarea>
								</div>
									<div class="col-xs-3" >
									<label>Manufacturing&nbsp;&nbsp;Process  :</label>
								<textarea  name="manufacture" rows="4" cols="30">
								</textarea>
								</div>
										<div class="col-xs-3">
									<label>Identification :</label>
								<textarea rows="2" cols="30" name="identification"> 
								</textarea>
								</div>
								</div>
								<hr>
								<div class="row">
								<h4 style="margin-left:30px;text-align:center"><b>Select Iterms</b></h4>
								</div>
								<table id="example" class="table table-striped table-bordered "width="100%">
 <thead>
 <tr>
      <th>Sl. No</th>
      <th>heat</th>
      <!-- <th>Material</th> -->
      <th>grade</th>
      <th>item Desc</th>
      <th>Qty&nbsp;In &nbsp;nos</th>
      <th>Qty&nbsp;In &nbsp;Wt</th>
      <th>Qty&nbsp;of &nbsp;tubes</th>
          <th>sdsd</th>
          
          </tr>
    </thead>
     <tbody>
<%
String heat="";
String grade="";
String item="";
String tubes="";
int i=1;
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("SELECT * FROM pouring1 p INNER JOIN moulding1 m where p.m_id=m.m_id and m.casting='2'");
while(rs.next())
{
	  heat=rs.getString("heat");
	 item=rs.getString("item_desc");

	   Statement st3= con.createStatement();
	   ResultSet rs3=st3.executeQuery("SELECT * FROM ip_furnace where m_id="+heat);
	   while(rs3.next())
			   {
			                grade=rs3.getString("grade_name");
			                Statement set= con.createStatement();
			         	   ResultSet res=set.executeQuery(" SELECT * FROM grade where id="+grade);
			         	   while(res.next())
			         			   {
			         		                   grade=res.getString("grade");
			         			   }
			         	   
		   					heat=rs3.getString("heat_no");
			   }
	   Statement st4= con.createStatement();
		 System.out.println(item);
	   ResultSet rs2=st4.executeQuery("SELECT * FROM ip_products where product_id="+item);
	   while(rs2.next())
			   {
		   
		   					item=rs2.getString("product_name");
			   }
	   Statement st5= con.createStatement();
		 System.out.println(item);
	   ResultSet rs5=st4.executeQuery("SELECT * FROM  centrifugal_chemical_data  where heat='"+heat+"' GROUP by heat");
	   while(rs5.next())
			   {
		   
		   					tubes=rs5.getString("qty_tubes");
			   }
	   %>

<tr>
       <td><%= i%> </td>      
       <td><%= heat%> </td>             
       <td><%=grade%> </td> 
       <td><%=item%> </td> 
          <td><%=rs.getString("t_qtyno")%> </td> 
             <td><%=rs.getString("t_qtywt")%> </td> 
             <td><%=tubes%></td>
   <td> <input name="qns[]"  id="check"  type="checkbox"  value="<%= heat%>_<%=grade%>_<%=item%>_<%=rs.getString("t_qtyno")%>_<%=rs.getString("t_qtywt")%> "  placeholder="check" ></td>  
                                
 </tr>
   <%
 i++;
  }
  %>
  </tbody>
   </table>
<input type="submit" value="submit"class="btn btn-info pull-right" style="margin-top:0px;">
							
								</div>
								</div>
								</div>
								</div>
								</div>
								</section>
								</form>
								</div>
<!-- 			<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> -->
<!--   <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>   -->
<!--   <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>  -->
<!--    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> -->
    

<!-- 	        <script> -->
<!-- //     $('.select1').select2(); -->
<!-- <!--     </script> --> -->
<!-- <!--  <script> --> -->
<!-- // 	 $('.choice').hide(); -->
<!-- // 	 var  total=0; -->
<!-- // 	$(document).ready(function(){		 -->
<!-- // 	     $("#select").change(function(){ -->
<!-- // 	        var textselected =  document.getElementById("select").value ; -->
<!-- // 	        //alert(textselected); -->
<!-- // 	            target = '.' + textselected; -->
<!-- // 	           // alert(target); -->
<!-- // 	         $('.choice').hide(); -->
<!-- // 	        $(target).show(); -->
<!-- // 	        var sum = 0; -->
<!-- // 	        var total = 0; -->
	       
	
<!-- //     }); -->
<!-- // 	}); -->

<!-- 	</script> -->
<!-- 	 <script> -->
//     $('select').select2();
<!--     </script>				 -->

</body>
</html>