Current File : /home/obabain/anms_obaba_in/updatebom.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%
Statement st=con.createStatement();
%>
<!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>
<%
try{
String id=request.getParameter("id");
String output = request.getParameter("itemcode1");
String Quantity = request.getParameter("qty");
String unit = request.getParameter("unit");
String workc = request.getParameter("workc");
String price = request.getParameter("price");
String d1_id=request.getParameter("did");
//String Ref_no=request.getParameter("rawm_id");
System.out.print(id);
if(output!=null || output.length()!=0 || output!="")
{
int i=st.executeUpdate("update bom_rawmaterial set product='"+output+"',quantity="+Quantity+",unit='"+unit+"',workcenter='"+workc+"',p_price="+price+" where B_id="+id+"");
}
response.sendRedirect("BOM.jsp?did="+d1_id+"");
}
catch(Exception el){out.print(el);}
%>
</form>
</body>
</html>