Current File : /home/obabain/khb_obaba_in/AddProductDA.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
 <%!
 
 String pname=null;
 String pgroup=null;
 String pgroup1=null;
 String phsn=null;
 String specification=null;
 String price=null;
 String qty=null;
 
 String unit=null;
 String unit1=null;
 String drg=null;
 String rev=null;
 String casting=null;
  String pouring=null;

  String grade=null;

  String grade1=null;
//   String email=null;
//   String phn=null;
  
//   String gst=null;
//   String pan=null;
//   String fax=null;
  
//   String acnum=null;
//   String acname=null;
//   String ifsc=null;
//   String crp=null;
//   String crl=null;
//   String cid=null;
//   String rem=null;
//   String pro=null;
//   String partno=null;
//   String m_grade=null;
//   String chem_property=null;
 %>
<%Statement st=con.createStatement(); 
String id=request.getParameter("id");
ResultSet rs=st.executeQuery("select * from ip_products  where product_id="+id);
while(rs.next())
{
	pname=rs.getString("product_name");
	pgroup=rs.getString("family_id");
	//System.out.print(pgroup);
	Statement st1=con.createStatement(); 
	
	ResultSet rs1=st1.executeQuery("select * from ip_families  where family_id="+pgroup);
	while(rs1.next())
	{
		pgroup1=rs1.getString("family_name");
	}
	
	phsn=rs.getString("product_sku");
	specification=rs.getString("product_description");
	price=rs.getString("product_price");
	qty=rs.getString("product_qua");
	
	unit=rs.getString("unit_id");
	Statement st3=con.createStatement(); 

	ResultSet rs3=st3.executeQuery("select * from ip_units  where unit_id="+unit);
	while(rs3.next())
	{
		unit1=rs3.getString("unit_name_plrl");
	}
	drg=rs.getString("drg_no");
	rev=rs.getString("rev_no");
	casting=rs.getString("casting_weight");
	
	pouring=rs.getString("pouring_weight");
grade=rs.getString("mat_grade");
Statement st2=con.createStatement(); 

ResultSet rs2=st2.executeQuery("select * from grade  where id="+grade);
while(rs2.next())
{
	grade1=rs2.getString("grade");
}

	
/* 	pro=rs.getString("prod");
 	partno=rs.getString("part");
	
	m_grade=rs.getString("mgrade");
	
	chem_property=rs.getString("chem_pro");*/
}
%>
<!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>
<%@include file="master.jsp" %>
<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">Product View</h3>
              </div>
             </div>
<div class="panel-body">
<div class="headerbar-item pull-right" style="margin-top:10px;"><a class="btn btn-danger " onclick="goBack()"><li class="glyphicon glyphicon-triangle-left"></li>Back</a>
<%-- <a style="background:#204b58" class="btn btn-info"href="editCustomer.jsp?Id=<%=id%>"><li class="glyphicon glyphicon-plus"></li>Edit</a> --%>
</div>
<div class="row">
<div class="form-group col-xs-4">
 <span style="color:#69BC98;"> <b><h2>Product Details</h2></b></span></br>

 
</div>
<div class="form-group col-xs-4">
<span><h3><%=pname %></h3></span></br>

 
</div>
</div>
<div class="row">
<div class="form-group col-xs-6">
<% if(pgroup.equals("1"))
{ %>
<table class="table table-bordered">
<tr>
<td>Product group</td>
<td><%=pgroup1 %> </td>
</tr>
<tr>
<td>Product Hsn</td>
<td><%=phsn %> </td>
</tr>
<tr>
<td>Specification</td>
<td><%=specification %></td>
</tr>
<tr>
<td>Price</td>
<td><%=price %> </td>
</tr>
<tr>
<td>Safety quantity</td>
<td><%=qty %> </td>
</tr>
<tr>
<td>Product Unit</td>
<td><%=unit1 %> </td>
</tr>
<tr>
<td>Drg No</td>
<td><%=drg %> </td>
</tr>
<tr>
<td>Rev No</td>
<td><%=rev %> </td>
</tr>
<tr>
<td>Casting Weight</td>
<td><%=casting %> </td>
</tr>
<tr>
<td>Pouring Weight</td>
<td><%=pouring %> </td>
</tr>

<tr>
<td>Grade</td>
<td><%=grade1 %> </td>
</tr>
</table>

<% }else 
{
%>
 
<table class="table table-bordered">
<tr>
<td>Product group</td>
<td><%=pgroup1 %></td>
</tr>
<tr>
<td>Product Hsn</td>
<td><%=phsn %> </td>
</tr>
<tr>
<td>Specification</td>
<td><%=specification %></td>
</tr>
<tr>
<td>Price</td>
<td><%=price %> </td>
</tr>
<tr>
<td>Safety quantity</td>
<td><%=qty %> </td>
</tr>
<tr>
<td>Product Unit</td>
<td><%=unit1 %> </td>
</tr>

</table>


<% }%>




</div>


</div>










</div>
</div>
</div>
</div>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>