Current File : /home/obabain/autoclutchess_obaba_in/Componentsedit.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="Connection.jsp" %>
    <%@include file="master.jsp" %>

  <% String from=request.getParameter("from");
     String to=request.getParameter("to");
     ResultSet rs=null;
     String pid=request.getParameter("Id");
     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">
<!-- <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://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
  -->
<title>Insert title here</title>
<style>

.scrollmenu {

  overflow: auto;
  white-space: nowrap;
}
</style>
<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://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.0/css/select.dataTables.min.css">
 
 <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/buttons/1.5.6/js/dataTables.buttons.min.js'></script>
 <script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.flash.min.js'></script>
 <script src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js'></script>
 <script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js'></script>
 <script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js'></script>
 <script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js'></script>
 <script src='https://cdn.datatables.net/buttons/1.5.6/js/buttons.print.min.js'></script>
 <script src='https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js'></script> 

 
 <script >
 $(document).ready(function() {
	    $('#someTable').DataTable( {
	        dom: 'Bfrtip',
	        buttons: [
	            'copy',
	            'csv',
	            'excel',
	            'pdf',
	            {
	                extend: 'print',
	                text: 'Print all (not just selected)',
	                exportOptions: {
	                    modifier: {
	                        selected: null
	                    }
	                }
	            }
	        ],
	        select: true
	    } );
	} );
 
 </script>

<script>
        $(function () {
            var $chk = $("#grpChkBox input:checkbox"); 
            var $tbl = $("#someTable");
            var $tblhead = $("#someTable th");

            $chk.prop('checked', true); 

            $chk.click(function () {
                var colToHide = $tblhead.filter("." + $(this).attr("name"));
                var index = $(colToHide).index();
                $tbl.find('tr :nth-child(' + (index + 1) + ')').toggle();
            });
        });
    </script>


</head>
<body>

<form  action="componenteditDA.jsp" method="post" id="contact" name="jv">

<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" style="background: linear-gradient(55deg, #0fb8ad 0%, #1fc8db 40%, #2cb5e8 85%);">
        <h3 class="panel-title"><a href="viewproduct_2.jsp">
          <span class="glyphicon glyphicon-th"></span>
        </a>&nbsp;&nbsp;Components &nbsp;&nbsp;Edit&nbsp;&nbsp; </h3>
        <div class="headerbar-item pull-right" style="margin-top:-23px;">
       <a href="component.jsp" class="btn btn-danger" style="width:200px;">Add New </a>
         <a style="background:#204b58" class="btn btn-info"  onclick="goBack()">Back</a>
       




</div>

        
              </div>
             </div>  
             

<div class="row" > 
   
    
       <input type="hidden" class=" form-control" name="Id" style="width:90px;" value="<%=pid%>" >
      
  <div style="overflow-x:auto;width:100%;">          
<table id="someTable" class="table table-striped table-bordered">

<thead>
<tr>
<th>Part Name</th>
           <th>Part No.</th>
            <th>Grade</th>
             <th>No.of Cavity</th>
              <th>Pattern Material</th>
               <th>Pattern Type</th>
                <th>Core Box Metal</th>
                 <th>No.of Core Box</th>
                  <th>No.core Box In Set</th>
                   <th>Casting Wt/pc</th>
                   
                   <th>PRNG wt/pc</th>
           <th>Returns wt/pc</th>
            <th>Casting wt/box</th>
             <th>PRNG wt/box</th>
              <th>Return wt/box</th>
               <th>Yeild %</th>
                <th>No.of Cores/pc</th>
                 <th>Core Process</th>
                  <th>Single Casting Core Wt in Kg</th>
                   <th>Mould Process</th>
                   
                  <th>Mould Wt Top in Kg</th>
           <th>Mould Wt Bottom in Kg</th>
            <th>Sleeve Size</th>
             <th>Sleeve Qty</th>
              <th>Filter Qty</th>
               <th>Mould Box Size Top</th>
                <th>Mould Box Size Bottom</th>



 


</tr>
</thead>
<tbody>
<%
try{
	
	int l=0;

 rs=st.executeQuery ("select * from	components where id='"+pid+"' ");

 

 while(rs.next())  
	{
	  
				
%>

<tr>
<td>
<input type="text" class=" form-control" name="1" style="width:150px;" value="<%=rs.getString("a1") %>" ></td>
<td><input type="text" class=" form-control" name="2" style="width:150px;" value="<%=rs.getString("a2") %>" ></td>
 <td><input type="text" class=" form-control" name="3" style="width:90px;" value="<%=rs.getString("a3") %>" ></td>
<td><input type="text" class=" form-control" name="4" style="width:90px;" value="<%=rs.getString("a4") %>" ></td>
 <td><input type="text" class=" form-control" name="5" style="width:90px;" value="<%=rs.getString("a5") %>" ></td>
<td><input type="text" class=" form-control" name="6" style="width:90px;" value="<%=rs.getString("a6") %>" ></td>
 <td><input type="text" class=" form-control" name="7" style="width:90px;" value="<%=rs.getString("a7") %>" ></td>
<td><input type="text" class=" form-control" name="8" style="width:90px;" value="<%=rs.getString("a8") %>" ></td>
 <td><input type="text" class=" form-control" name="9" style="width:90px;" value="<%=rs.getString("a9") %>" ></td>
<td><input type="text" class=" form-control" name="10" style="width:90px;" value="<%=rs.getString("a10") %>" ></td>

  <td><input type="text" class=" form-control" name="11" style="width:90px;" value="<%=rs.getString("a11") %>" ></td>
<td><input type="text" class=" form-control" name="12" style="width:90px;" value="<%=rs.getString("a12") %>" ></td>
 <td><input type="text" class=" form-control" name="13" style="width:90px;" value="<%=rs.getString("a13") %>" ></td>
<td><input type="text" class=" form-control" name="14" style="width:90px;" value="<%=rs.getString("a14") %>" ></td>
 <td><input type="text" class=" form-control" name="15" value="<%=rs.getString("a15") %>" style="width:90px;" ></td>
<td><input type="text" class=" form-control" name="16" style="width:90px;" value="<%=rs.getString("a16") %>" ></td>
 <td><input type="text" class=" form-control" name="17" style="width:90px;" value="<%=rs.getString("a17") %>" ></td>
<td><input type="text" class=" form-control" name="18" style="width:90px;" value="<%=rs.getString("a18") %>" ></td>
 <td><input type="text" class=" form-control" name="19" style="width:90px;" value="<%=rs.getString("a19") %>" ></td>
<td><input type="text" class=" form-control" name="20" style="width:90px;" value="<%=rs.getString("a20") %>" ></td>

  <td><input type="text" class=" form-control" name="21" style="width:90px;" value="<%=rs.getString("a21") %>" ></td>
<td><input type="text" class=" form-control" name="22" style="width:90px;" value="<%=rs.getString("a22") %>" ></td>
 <td><input type="text" class=" form-control" name="23" style="width:90px;" value="<%=rs.getString("a23") %>" ></td>
<td><input type="text" class=" form-control" name="24" style="width:90px;" value="<%=rs.getString("a24") %>" ></td>
 <td><input type="text" class=" form-control" name="25" style="width:90px;" value="<%=rs.getString("a25") %>" ></td>
<td><input type="text" class=" form-control" name="26" style="width:150px;" value="<%=rs.getString("a26") %>" ></td>
 <td><input type="text" class=" form-control" name="27" style="width:150px;" value="<%=rs.getString("a27") %>" ></td>


<% } 
	}
	catch(Exception el){}
	%>
</tr>



</tbody>












</table>
</div>
<div class="modal-footer" id="contact_submit">
       <input type="button" value="Back" style="background:#204b58;margin-right:720px" class="btn btn-info pull-left" onclick="goBack()"/>
        <a class="btn btn-default" href="customerNew.jsp">Reset</a>
        <button type="submit" style="background:#204b58" class="btn btn-info" onclick="validatename()" >Save Changes</button>
      </div>



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

<%@include file="footer.jsp" %>
</form>

<script>
     $(document).on("change",'.qty', function(){
         "use strict";
         var parent = $(this).parents('tr');
  var s=$('.price',parent).val();
  var di=this.value;
  //var di=$('#rj').val()
  var g=parseFloat(s)*parseFloat(di);
  $('.netamt',parent).val(g);
  
});
    </script>

<script>
     $(document).on("change",'.qty1', function(){
         "use strict";
         var parent = $(this).parents('tr');
  var s=$('.price1',parent).val();
  var di=this.value;
  //var di=$('#rj').val()
  var g=parseFloat(s)*parseFloat(di);
  $('.netamt1',parent).val(g);
  
});
    </script>
<script>
     $(document).on("change",'.qty2', function(){
         "use strict";
         var parent = $(this).parents('tr');
  var s=$('.price2',parent).val();
  var di=this.value;
  //var di=$('#rj').val()
  var g=parseFloat(s)*parseFloat(di);
  $('.netamt2',parent).val(g);
  
});
    </script>
<script type="text/javascript">
function goBack() {window.history.back();};
</script>


 
    

</body>
</html>