Current File : /home/obabain/public_html/abc/ProductSelection.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*" %>
<%@ include file="Connection.jsp" %>
<% String id=request.getParameter("sid");
%>
<!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 href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/estilos.css" rel="stylesheet">
<link href="css/Mystyle.css" rel="stylesheet">
<title>Insert title here</title>
</head>
<body>
<div class="content-page"><div class="content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="page-header-title">
<div class="clearfix"></div></div></div></div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default" >
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Select Product</h3>
<div class="headerbar-item pull-right" style="margin-top:-22px;padding-right:130px">
<a class="btn btn-info" style="background:#204b58" href="ViewPorder.jsp">View PO</a>
</div>
</div>
<div class="panel-body">
<form action="PurchaseOrder.jsp" method="post">
<div>
<input type="button" value="Back" style="background:#204b58;" class="btn btn-info pull-left" onclick="goBack()"/>
<input type="submit" id="approve" class="btn btn-info pull-right" style="background:#204b58" value="submit" >
</div>
<div>
<input class="form-control" type="text" placeholder="Search product..." name="filter" id="myInput" onkeyup="myFunction()"><a></a>
</div>
<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sl. No</th>
<th>Item Description</th>
<th>Specification</th>
<th>HSN</th>
<th>Price</th>
<th></th>
</tr>
</thead>
<tbody>
<%
/* String sql="SELECT id, jcn_name FROM job_certification_name where del_status='1'";
*/
Statement st=con.createStatement();
//String sql="select * from ip_products order by product_name asc";
String sql="select tb.*,(select product_id from ip_products where product_id=tb.product)pid,(select product_sku from ip_products where product_id=tb.product)sku,(select product_name from ip_products where product_id=tb.product)pname,(select product_description from ip_products where product_id=tb.product)pdisc,(select product_price from ip_products where product_id=tb.product)pprice from ip_supplier_product tb where supplier_id="+id+"";
String pono=request.getParameter("pono");
session.setAttribute("pono", pono);
ResultSet rs=st.executeQuery(sql);
String js;
String jd;
String jh;
String jp;
int i=0;
%>
<%
while(rs.next())
{
//int id=rs.getInt("product_id");
int id1=rs.getInt("pid");
js=rs.getString("pname");
jd=rs.getString("pdisc");
jh=rs.getString("mode_of_transport");
jp=rs.getString("s_product_rate");
%>
<tr>
<td><%=id1%></td>
<td><%=js%></td>
<td><%=jd%></td>
<td><%=jh%></td>
<td><%=jp%></td>
<td> <input name="qns[]" id="check" type="checkbox" value="<% out.print(rs.getString("pid")); %>_<% out.print(rs.getString("pname")); %>_<% out.print(rs.getString("pdisc")); %>_<% out.print(rs.getString("mode_of_transport")); %>_<% out.print(rs.getString("s_product_rate")); %>_<% out.print(rs.getString("unit")); %>" placeholder="check" ></td>
</tr>
<%
i++;
//System.out.print(pono);
}
%>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
function goBack() {
window.history.back();
};
</script>
<script>
function myFunction() {
var input, filter, table, tr, td, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("datatable-responsive");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1];
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body>
</html>