Current File : /home/obabain/khb_obaba_in/Testcertificatecreation.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">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
<div class="row">
<form action="TestCertificateDA.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">Test certificate creation
</h3>
<a href="TestCertificateView.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>
<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 In nos</th>
<th>Qty In Wt</th> -->
<th>Select</th>
</tr>
</thead>
<tbody>
<%
String heat="";
String grade="";
String item="";
int i=1;
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("SELECT * FROM test_certificate_data1 group by heat");
while(rs.next())
{
heat=rs.getString("heat");
//item=rs.getString("item_desc");
grade=rs.getString("grade");
/* 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");
} */
%>
<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> <input name="qns[]" id="check" type="checkbox" value="<%= heat%>_<%=grade%>" 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>
</body>
</html>