Current File : /home/obabain/autoclutchess_obaba_in/patternview.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%@include file="master.jsp" %>
<%!
String alert=null;
ResultSet rstock=null;
public int nullIntconv(String str)
{
int conv=0;
if(str==null)
{
str="0";
}
else if((str.trim()).equals("null"))
{
str="0";
}
else if(str.equals(""))
{
str="0";
}
try{
conv=Integer.parseInt(str);
}
catch(Exception e)
{
}
return conv;
}
%>
<%
Statement st=con.createStatement();
//ResultSet rsPagination = null;
ResultSet rsRowCnt = null;
int iShowRows=10; // Number of records show on per page
int iTotalSearchRecords=10; // Number of pages index shown
int iTotalRows=nullIntconv(request.getParameter("iTotalRows"));
int iTotalPages=nullIntconv(request.getParameter("iTotalPages"));
int iPageNo=nullIntconv(request.getParameter("iPageNo"));
int cPageNo=nullIntconv(request.getParameter("cPageNo"));
String filt=request.getParameter("filter");
if(iPageNo==0)
{
iPageNo=0;
}
else{
iPageNo=Math.abs((iPageNo-1)*iShowRows);
}
int iStartResultNo=0;
int iEndResultNo=0;
rstock=st.executeQuery("select case when (select product_qua from ip_products where product_id=tb.product_id)+(select sum(qty_pur)from ip_stock_register where product_id=tb.product_id )<100 then 'img/red-warning-sign.png' else 1 end as al from ip_products tb where branch_id="+loginid+"");
while(rstock.next())
{
alert=rstock.getString("al");
}
%>
<!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>
</head>
<body>
<form>
<div class="content">
<div class="row">
<div class="col-md-9" style="background-color:white;">
<div class="panel panel-default" >
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Patterns</h3>
<a class=" btn btn-primary headerbar-item pull-right" style="background:#da2c4c;margin-top:-25px" class="btn btn-info" onclick="goBack()">Back</a>
<a class="btn btn-primary headerbar-item pull-right" style="background:#da2c4c;margin-top:-25px" href="pattern_details.jsp">New</a>
</div>
</div>
<div class="col-md-12">
<input class="form-control" type="text" placeholder="Search Products..." name="filter">
</div>
<div>
<table class="table table-striped">
<thead>
<tr>
<th>Sl.No</th>
<th>Pattern Number</th>
<th>POuring Weight</th>
<th>Pattern By</th>
<th>Method</th>
<th>iterm Pattern Type</th>
<th>Issue No & Date</th>
<th>Rev No & Date</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<%
try{
ResultSet result=null;
int i=0;
result =st.executeQuery("select tb.*,(select sum(c_qty) from pattern_details2 where p_id=tb.id)tqty from pattern_details tb");
while(result.next())
{
i+=1;
%>
<tr>
<td><%=i %></td>
<td><a href="patternview2.jsp?id=<%=result.getString("id")%>&id2=<%=result.getString("pattern_number")%>">
<%=result.getString("pattern_number")%></a></td>
<td><%=result.getString("tqty")%></td>
<td><%=result.getString("pattern_by")%></td>
<td><%=result.getString("methoding")%></td>
<td><%=result.getString("itempattern_type")%></td>
<td><%=result.getString("issue_no")%> & <%=result.getString("issue_date")%></td>
<td><%=result.getString("dev_no")%> & <%=result.getString("dev_date")%></td>
<td>
<div class="options btn-group">
<a class="btn btn-default dropdown-toggle fontstyle" data-toggle="dropdown">
<li class="glyphicon glyphicon-cog"><span class="fontstyle">Options</span></li>
</a>
<ul class="dropdown-menu">
<li>
<span class="fontstyle">Raw Material Specification</span>
</a>
</li>
<li>
<span class="fontstyle">Temperature</span>
</li>
<li>
<span class="fontstyle">Mechanical Property</span>
</li> >
<li>
<span class="fontstyle">Chemical Property</span>
</li>
<li>
<span class="fontstyle">Heat Treatment</span>
</li>
<li>
<span class="fontstyle">Edit</span>
</a>
</li>
<li>
</li>
</ul>
</div>
</td>
<% }
}
catch(Exception el){
out.println(el);
}
%>
</tr>
</tbody>
</table>
</div>
</div>
</div></div>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {
window.history.back();
};
</script>
</body>
</html>