Current File : //home/obabain/anms_obaba_in/deletePurchaseInvoicee.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%!
String pino=null;
%>
<%
Statement st=con.createStatement();
String id=request.getParameter("Id");
ResultSet rs=null;
rs=st.executeQuery("select * from ip_puchase_invoice2 where pinvoice_id="+id+"");
while(rs.next())
{
pino=rs.getString("purchase_invoice_no");
}
/* rs=st.executeQuery("select * from ip_purchase_invoice_item where invoice_id="+id+"");
while(rs.next())
{
Statement st1=con.createStatement();
int i=st1.executeUpdate("delete from ip_stock_register where ");
} */
%>
<!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 method="post">
<%
try
{
st.executeUpdate("delete from ip_puchase_invoice2 where pinvoice_id="+id+"");
Statement st1=con.createStatement();
st1.executeUpdate("delete from ip_stock_register where invno='"+id+"' and type='P'");
response.sendRedirect("ViewInvoicePurchase1.jsp");
}
catch(Exception el){}
%>
</form>
</body>
</html>