Current File : /home/obabain/public_html/abc/Tc_Item_DA.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%-- <%
String loginid=(String)session.getAttribute("logid");
%> --%>
<%-- <%!
String clname=null; %>
<%Statement st=con.createStatement();
ResultSet rs= null;
id=request.getParameter("Id");
rs=st.executeQuery("select * from ip_clients where client_id="+id+"");
while(rs.next())
{
clname=rs.getString("client_name");
}
%> --%>
<!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>
<%
try
{
String productid=request.getParameter("productid");
String partno=request.getParameter("partno");
String qtyno=request.getParameter("qtyno");
String totalqty=request.getParameter("totalqty");
String tid=request.getParameter("tid");
String voucher = "";
String[] a=null;
a=request.getParameterValues("heatno[]");
for(int m=0;m<a.length;m++){
voucher+=a[m]+",";
}
/* Statement stm=con.createStatement(); */
Statement st=con.createStatement();
int l=st.executeUpdate("insert into test_items_sc(item_des,part_no,heat_no,qty_no,total_qty,product_id,tid) values((select product_name from ip_products where product_id='"+productid+"'),'"+partno+"','"+voucher+"','"+qtyno+"','"+totalqty+"','"+productid+"','"+tid+"')");
response.sendRedirect("Tc_Items.jsp?tid="+tid+"");
}
catch(Exception el){
out.println(el);
}
%>
</body>
</html>