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

<%

ResultSet resultSet = null;
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>
    
    
    
  
<style type="text/css">
.highlight-error {
  border-color: red;
}
  .btn{
        background: #ccc;
    }

    /** on active **/

.btn:focus{
        background: red;
    }
    .active, .btn:hover {
    background-color: #666;
    color: white;
}
</style>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="js/jquery-2.1.0.min.js"></script>


<script src="js/tableEdit-0.1.js"></script>



<body>


<script type="text/javascript">
function getqc(targetField,targetField1)
{
	var w3=window.open('Productselect.jsp','_blank','top=80,left=70,width=1400,height=650,scrollbars=1')
	w3.targetField=targetField;
	w3.targetField1=targetField1;
	
	w3.focus();
	}
</script>
<script>
function setSearchRslt2(targetField,targetField1,returnvalue,returnvalue1)
{
	targetField.value = returnvalue;
	targetField1.value = returnvalue1;
    window.focus();
}
</script>

<script type="text/javascript">
function getqc1(targetField,targetField1)
{
	var w3=window.open('Productselect1.jsp','_blank','top=80,left=70,width=1400,height=650,scrollbars=1')
	w3.targetField=targetField;
	w3.targetField1=targetField1;
	
	w3.focus();
	}
</script>
<script type="text/javascript">
function setSearchRslt3(targetField,targetField1,returnvalue,returnvalue1)
{
	targetField.value = returnvalue;
	targetField1.value = returnvalue1;
    window.focus();
}
</script>




<div class="row">
<form action=""  method="post" id="contact" name="form1">
<section id="main">
<div class="container">
 <div class="row" style="width:110%">
    <div class="col-md-10" >
       <div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Account and Ledger "Currencies":</h3>
    </div>
    
         
           <br><br><div class="panel-body"  >
       <div class="row" >     
              
          
           
        <label for="lastname" style="margin-left:25px;float:;">Currency Abbreviation:</label>

                
                 <input  style="width:130px;margin-right:40px;"  type="text" 
                       
                      name="L_abbriviation" placeholder=""/>
                   
                   
          <label for="lastname" style="margin-left:15px;">Currency Symbol:</label>
                <input   style="width:170px;margin:5px;"  type="text" 
                       
                      name="L_symbol" placeholder=""/>
   
                  
     
       

            <label for="lastname" style="margin-left:40px;">   Name :</label>
                <input    style="width:170px;margin:5px;"  type="text" 
                       
                      name="L_name" placeholder=""/>
              
             
            

 
         
            
        </div>
<br>
          <div class="row" >     
              
          
           
        <label for="lastname" style="margin-left:55px;float:;">Hundredths Name:</label>

                
                 <input  style="width:130px;margin-right:40px;"  type="text" 
                       
                      name="L_hname" placeholder=""/>
                   
                   
          <label for="lastname" style="margin-left:76px;">Country:</label>
                <input   style="width:170px;margin:5px;"  type="text" 
                       
                      name="L_country" placeholder=""/>
   
                  
     
       

            

 
         
            
        </div>

          
             
        
         
 
            
           
        
                    
           </div>  
      
      
         <div class="modal-footer" id="contact_submit">
         <input type="button" value="Back" style="background:#204b58;margin-right:720px" class="btn btn-info" />
          <a class="btn btn-default"  href="">Reset</a>
      <!--  <button type="submit" style="background:#204b58" class="btn btn-info" >Save Changes</button>-->
        <input type="submit" style="background:#204b58;" class="btn btn-info" value="Save changes">
       
        <strong></strong>
      </div> 
      
       <%
String L_abbriviation=request.getParameter("L_abbriviation");
String L_symbol=request.getParameter("L_symbol");
String L_name=request.getParameter("L_name");
String L_hname=request.getParameter("L_hname");
String L_country=request.getParameter("L_country");


try
{
	Statement st=con.createStatement();
int i=st.executeUpdate("insert into ledgercurrency(L_abbriviation,L_symbol,L_name,L_hname,L_country)values('"+L_abbriviation+"','"+L_symbol+"','"+L_name+"','"+L_hname+"','"+L_country+"')");
out.println("");
}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>     
        
      
      
      
      
      
       
     &nbsp; <b>View</b>
      <br>   
    <div class="panel-body">
    
<table  class="table table-bordered">
<tr>
<th>Abbreviation</th>
<th>Symbol</th>
<th>Name</th>
<th>Hundredths name</th>
<th>Country</th>
<th>Edit</th>
<th>Delete</th>
</tr>

<%
try{
	Statement st=con.createStatement();
String sql4 ="select * from ledgercurrency";
resultSet = st.executeQuery(sql4);
while(resultSet.next()){
%>



<tbody>
<tr>



<td>

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

<td>

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

<td>

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



<td>

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


<td>
<%--  <input type="button" name="edit" value="Edit" onclick="editRecord(<%=r1.getString(1)%>);" ><i class="material-icons">&#xe254;</i>
 --%> 
<%--  <td><input type="button" name="edit" value="Edit" style="background-color:#49743D;font-weight:bold;color:#ffffff;" onclick="editRecord(<%=r1.getString("d_id")%>);" ></td>
 --%>
 <a href="#"><span class="glyphicon glyphicon-pencil"></span></a>
 </td>


<td>
 <a href='#' ><i class='glyphicon glyphicon-trash'></i> </a>
 
</td>
  <%

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

</tr>



</tbody>
</table>
</div> 
         
 
        
         
       
       
       
      
      
          
          
            
           
            
            
     </div>
     </div>  
    
  </div>
  
  
  
           
 

</section>
<%-- <% }else{ 
     response.sendRedirect("login.jsp");
    } %> --%>




</form>
</body>
</html>