Current File : /home/obabain/public_html/abc/work_centre_view.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@include file="master.jsp" %>
<%@include file="Connection.jsp" %> 
<%!
String shlr=null;
String shohr=null;
ResultSet resultSet = null;
%>
<%
Statement st1=con.createStatement();
resultSet =st1.executeQuery("select * from shop_rate_details");
while(resultSet.next())
{
	shlr=resultSet.getString("shop_labor_rate");
	shohr=resultSet.getString("shop_overhead_rate");
}
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>

<!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>

<style type="text/css">
.vl {
    border-left: 1px solid #204b58;
    border-right: 1px solid #204b58;
    border-top: 1px solid #204b58;
    border-bottom: 1px solid #204b58;
    height: 110px;
    padding-top:20px;
    padding-left:15px;
}
.gl {
    border-left: 1px solid #204b58;
    border-right: 1px solid #204b58;
    border-top: 1px solid #204b58;
    border-bottom: 1px solid #204b58;
    height: 240px;
    padding-top:20px;
    padding-left:15px; 
}
.bl {
    border-left: 1px solid #204b58;
    border-right: 1px solid #204b58;
    border-top: 1px solid #204b58;
    border-bottom: 1px solid #204b58;
   /*  height: 135px; */
    padding-top:13px;
    padding-left:15px;
    padding-bottom:25px;
}
.cl {
    border-left: 1px solid #204b58;
    border-right: 1px solid #204b58;
    border-top: 1px solid #204b58;
    border-bottom: 1px solid #204b58;
   /*  height: 135px; */
    padding-top:13px;
    padding-left:15px;
    padding-bottom:25px;
}





</style>
</head>
<body>
<form action="" method="post">
<%-- <%@include file="master.jsp" %> --%>
<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">
        <h3 class="panel-title">Work Centers - Detail Tab </h3>
              </div>
             </div>
     
     	<script>
		function show(elementID) {
		    var ele = document.getElementById(elementID);
		    if (!ele) {
		        alert("no such element");
		        return;
		    }
		    var pages = document.getElementsByClassName('page');
		    for(var i = 0; i < pages.length; i++) {
		        pages[i].style.display = 'none';
		    }
		    ele.style.display = 'block';
		}
</script>               
     <div align="left" >
<!-- <a onclick="show('Page1');"><input type="button" value="WORK CENTERS" style="background:#008CBA;" class="btn btn-info"  /></a>
<a onclick="show('Page2');"><input type="button" value="DETAILS" style="background:#008CBA;" class="btn btn-info"  /></a>
 <a onclick="show('Page3');"><input type="button" value="PROCESSES" style="background:#008CBA;" class="btn btn-info"  /></a>
 <a onclick="show('Page4');"><input type="button" value="MACHINES" style="background:#008CBA;" class="btn btn-info"  /></a> -->
 <!--   <a onclick="show('Page5');"><input type="button" value="CONTACT DETAILS" style="background:#008CBA;" class="btn btn-info"  /></a>
 <a onclick="show('Page6');"><input type="button" value="DOCUMENT DETAILS" style="background:#008CBA;" class="btn btn-info"  /></a> -->
 </div><br><br>
  <!--  <div id="Page1" class="page"  style="display:">   -->       
 <!-- <div class="row">
             <div class="form-group col-xs-3">
            <div class="onerow">
            <label>Shop Labor Rate :</label>
           <input  type="number"  min="1"  name="shoplabor_rate"  class="form-control input-group-lg reg_name"style="width:200px;margin-top:-28px;margin-left:130px;" >              
</div>
</div>
 <div class="form-group col-xs-3">
            <div class="onerow">
              <label style="margin-left:150px;">ShopOverheadRate:</label>
           <input type="number" min="1" name="sover_rate" class="form-control input-group-lg reg_name" style="width:200px;margin-left:289px;margin-top:-28px;" placeholder="Ex-Assembly Work Center">              
</div>
</div> 
<div class="form-group col-xs-3">
            <div class="onerow">
              <label>  Setup Rate</label>
           <input type="text" name="setup_rate" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;">              
</div>
</div>
</div> -->

<!-- Work Centers Details Tab Started -->
<div style="display:">
 
   <div class="row" >
  <div align="right" >
<a href="WorkCenterTab.jsp"><input type="button" value="Add New" style="background:#204b58;margin-right: 50px" class="btn btn-info"  /></a>
 </div>       
  
 <div class="panel-body">
            
                    <b>View WorkCenter:</b>         
            
      
<table id="myTable" class="table table-bordered" style="width:1120px;">
<tr>
	<!-- <th>ShopLaborRate </th>
	<th>ShopOverheadRate</th> -->
	<th>WorkCenter ID</th>
	<th>Description</th>
	<th>SetupRate</th>
	<th>SetupFactor</th>
	<th>LaborRate</th>
	<th>LaborFactor</th>
	<th>MfgOHRate</th>
	<th>MfgOHFactor</th>
	<th>Multi-Clockins</th>
	 <th>machines</th> 
	<th>Active</th>
	
</tr>
<%
try{
	Statement st=con.createStatement();
String sql ="select tb.*,(case when active=1 then 'checked' else '' end)as act,(case when multi_clockins=1 then 'checked' else '' end)as multi from workcentertab tb";
resultSet = st.executeQuery(sql);
while(resultSet.next()){
%>





<tbody>

	<tr>

	
<td><a href="WorkCenterDetails.jsp?id=<%=resultSet.getString("id") %>">
  <%=resultSet.getString("workcenter_id") %>  </a>       
           
	</td>

	<td>
 <%=resultSet.getString("description") %> 
	</td>


	 <td>
 <%=resultSet.getString("setup_rate") %> 
	</td>
 
	<td>
 <%=resultSet.getString("setup_factor") %> 
 	</td>
 
	<td>
 <%=resultSet.getString("labor_rate") %> 
 	</td>
  
 	<td>
<%--  <a href="editTask_template.jsp?Id=<%=resultSet.getString("id") %>"><span class="glyphicon glyphicon-pencil"></span></a>  --%>
 	
 	<%=resultSet.getString("labor_factor") %> 
 	
 	
 	</td>
 
 	<td>
 	
 	<%=resultSet.getString("mfg_oh_Rate") %> 
 	
 
 
 
 	</td>
 	
 	<td> <%=resultSet.getString("mfg_oh_factor") %> </td>
 	
 	<td> <input type="checkbox" <%=resultSet.getString("multi") %> >  </td>
 	
   <td>     <%=resultSet.getString("machines") %>      </td>

   <td>  <input type="checkbox" <%=resultSet.getString("act") %> >     </td>
<!-- <td></td> -->
</tr>
<%
}

} catch (Exception e) {
e.printStackTrace();
}
%>


</tbody>
</table>
			</div>  
					</div>
 <div class="row">
<div class="form-group col-xs-3">
            <div class="onerow" >
               <label>Shop Labor Rate</label>
           <input type="number" name="mfg_oh_Rate" value="<%=shlr %>" class="form-control input-group-lg reg_name" style="width:200px;">              
</div>
</div>
<div class="form-group col-xs-3">
            <div class="onerow">
               <label>Shop Overhead Rate</label>
           <input type="number" name="mfg_oh_Rate" value="<%=shohr %>" class="form-control input-group-lg reg_name" style="width:200px;">              
</div>
</div>
 </div>
 
 </div> 
 
 </div>
 </div>
 </div>
 </form>
</body>
</html>