Current File : /home/obabain/autoclutchess_obaba_in/AAAAChanges.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp" %>
            <%@page import="java.sql.ResultSet"%>
            <%@page import="java.sql.*,java.util.*"%>
            
            <%
             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>
<%@include file="master.jsp"%>

  <script src='https://code.jquery.com/jquery-3.3.1.js'></script>   
 <script src='https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'></script> 
 <script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js" charset="utf-8"></script>   
 <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css">  -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css"> 

 <style>
 table {
    border-collapse: collapse;
    border-spacing: ;
    width: 80%;
    border: 1px solid #ddd;
} 

th,td{
    text-align: left;
    padding: 16px;
} 

tr:nth-child(even) {
    background-color: #f2f2f2
}

.rrow {
   display:inline-block;
    clear: both;     
} 
 .center {
    margin: auto;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
} 
.hideform
 {
  display:none;
 }   
</style>  
<body>

  <form action="" method="post">
       <div class="row">
          <div class="col-md-6">
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                   <h3 class="panel-title">Product Group Creation</h3>
                   <a style="background:;margin-top:-23px; " class="btn btn-success pull-right" href="viewproductgroup.jsp">View</a>
              </div>
              
  <div class="panel-body"> 
   
    <div class="row" style="margin-left:50px;"> 
          
        <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;id</label>
          <input    type="text" style="width:350px;" name="id" class="form-control" id="datetimepicker"> 
        </div>  
          <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;name</label>
          <input    type="text" style="width:350px;" name="name" class="form-control" id="datetimepicker"> 
        </div>  
          <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;aty</label>
          <input    type="text" style="width:350px;" name="qty" class="form-control" id="datetimepicker"> 
        </div>  
    </div>

 <div class="row" style="margin-left:50px;"> 
          
        <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;date</label>
          <input    type="text" style="width:350px;" name="date" class="form-control"value="2021-04-01"> 
        </div>  
          <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;Group</label>
          <input    type="text" style="width:350px;" name="group" class="form-control" value="8""> 
        </div>  
          <div class="col-xs-4">
          <label for="lastname" style=" color:;">Product&nbsp;type</label>
          <input    type="text" style="width:350px;" name="type" class="form-control" value="open"> 
        </div>  
    </div>
<br>
        <input type="submit" class="btn btn-primary" style="margin-left:230px;">      
        <input type="button" value="Back" style="background:#204b58;" class="pull-left btn btn-info" onclick="goBack()">
</form>
             <%
              String id=request.getParameter("id");
             String name1=request.getParameter("name");
             String qty=request.getParameter("qty");
             String date=request.getParameter("date");
             String group=request.getParameter("group");
             String type1=request.getParameter("type");
             %>

             <%
			  try
               {
    	        if(group!=null ||group.length()!=0)
    	         {
                  int i=st.executeUpdate("INSERT INTO ip_stock_register1( product_id, product_name, qty_pur, closing_qty, product_hsn, last_updated_date, status, last_updated_by, total_qty_nos, total_qty_wt, rej_qty_nos, rej_qty_wt, qc_name, product_grp, type, invno, invdate, pono, podate, batchno, branch_id, grnno, return_qty, price, value) values ( '"+id+"', '"+name1+"', '"+qty+"', '0', '0', '2021-04-01', NULL, NULL, '"+qty+"', '0', '0', '0', '0', '"+group+"', 'open', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')");
                 }
    	        response.sendRedirect("AAAAChanges.jsp"); 
               }
               catch(Exception e)
               {
                System.out.print(e);
                e.printStackTrace();
              }   
			%> 

<script>
function goBack() 
{
    window.history.back();
}
</script>

             </div> 
              
         </div> 
      </div>
   </div>

    
<script type="text/javascript">
 function goBack() 
   {
    window.history.back();  
   };
</script>       
         
</body>
</html>