Current File : /home/obabain/public_html/abc/ViewBankAccount.jsp |
<%@include file="master.jsp" %>
<%@include file="Connection.jsp" %>
<%
Connection connection = null;
Statement statement = null;
ResultSet resultSet = null;
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Connection"%>
<style type="text/css">
.highlight-error {
border-color: red;
}
.inlineTable {
display: inline-block;
}
table, th, td {
border: px solid black;
}
.panel-default > .panel-heading-custom {
background: #ff0000; color: #fff;
}
.vl {
border-left: 1px solid #204b58;
border-right: 1px solid #204b58;
border-top: 1px solid #204b58;
border-bottom: 1px solid #204b58;
height: 520px;
}
</style>
<!-- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">-->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<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>
<body>
<script>
function myFunction() {
var x = document.getElementById("myDIV");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</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">View "Bank Account"</h3>
</div>
<br>
<%-- <%
String b_Rno=request.getParameter("b_Rno");
String b_AcType=request.getParameter("b_AcType");
String b_currency=request.getParameter("b_currency");
String b_state=request.getParameter("b_state");
String b_inbalance=request.getParameter("b_inbalance");
String b_date=request.getParameter("b_date");
String b_minAllowedbal=request.getParameter("b_minAllowedbal");
String b_minDesiredbal=request.getParameter("b_minDesiredbal");
String b_status=request.getParameter("b_status");
String b_bankname=request.getParameter("b_bankname");
String b_accNo=request.getParameter("b_accNo");
String b_ifsc=request.getParameter("b_ifsc");
String b_accaddress=request.getParameter("b_accaddress");
String b_accownername=request.getParameter("b_accownername");
String b_accowneraddress=request.getParameter("b_accowneraddress");
String b_glcode=request.getParameter("b_glcode");
String b_chargesaccount=request.getParameter("b_chargesaccount");
try
{
Statement st=con.createStatement();
int i=st.executeUpdate("insert into bankaccount(b_Rno,b_AcType,b_currency,b_state,b_inbalance,b_date,b_minAllowedbal,b_minDesiredbal,b_status,b_bankname,b_accNo,b_ifsc,b_accaddress,b_accownername,b_accowneraddress,b_glcode,b_chargesaccount)values('"+b_Rno+"','"+b_AcType+"','"+b_currency+"','"+b_state+"','"+b_inbalance+"','"+b_date+"','"+b_minAllowedbal+"','"+b_minDesiredbal+"','"+b_status+"','"+b_bankname+"','"+b_accNo+"','"+b_ifsc+"','"+b_accaddress+"','"+b_accownername+"','"+b_accowneraddress+"','"+b_glcode+"','"+b_chargesaccount+"')");
out.println("");
}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%> --%>
<b>View of Bank Account Form</b>
<div style="float:right;" >
<a href="ANew.jsp"><input type="button" value="Back " style="background:#204b58;margin-right: 50px;" class="btn btn-info"/></a>
</div> <br>
<div class="panel-body">
<table id="makeEditable" class="table table-bordered">
<tr>
<th>Reference Number</th>
<th>Bank Accounts</th>
<th>Type</th>
<th>Status</th>
<th>Balance</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<%
try{
Statement st=con.createStatement();
String sql ="select * from bankaccount";
resultSet = st.executeQuery(sql);
while(resultSet.next()){
%>
<tbody>
<tr>
<td>
<%=resultSet.getString("b_Rno") %>
</td>
<td onclick="myFunction()">
<%=resultSet.getString("b_accNo") %>
</td>
<td>
<%=resultSet.getString("b_AcType") %>
</td>
<td>
<%=resultSet.getString("b_status") %>
</td>
<td>
<%=resultSet.getString("b_inbalance") %>
</td>
<td>
<%-- <input type="button" name="edit" value="Edit" onclick="editRecord(<%=r1.getString(1)%>);" ><i class="material-icons"></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='#' onclick='deleteRow(this)'><i class='glyphicon glyphicon-trash'></i> </a>-->
<a href="ViewBankAccount.jsp?b_id=<%=resultSet.getString("b_id")%>"><button type="button" class="delete"><i class='glyphicon glyphicon-trash'></i></button></a>
</td>
</tr>
<%
}
} catch (Exception e) {
e.printStackTrace();
}
%>
</tbody>
</table>
</div>
<div id="myDIV" style="display:none">
<div class="panel-body" >
<b>complete details:</b>
<div class="vl">
<br>
<label for="" style="margin-left:80px">Reference Number:</label>
<input type="text" id="register_name" style="width:170px;"/>
<label for="" style="margin-left:125px" >Bank name :</label>
<input type="text" id="register_name" style="width:170px;height:25px;"/>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:110px;">Account Type :</label></td>
<td><!-- <input type="text" name="b_AcType" value="" id="register_name" style="width:160px;"/>-->
<select name="b_AcType" style="width:170px;height:25px;" >
<option>Saving Account</option>
<option >Regular Savings</option>
<option >Current Account</option>
<option >Recurring Deposit Account</option>
<option >Fixed Deposit Account</option>
<option >DEMAT Account</option>
<option >NRI Accounts</option>
</select></td>
<td class="tdLabel"><label for="" style="margin-left:124px" >Account number :</label></td>
<td><input type="text" name="b_accNo" value="" id="register_name" style="width:170px;"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:140px;"> Currency :</label></td>
<td>
<select name="b_currency" style="width:170px;height:25px;">
<option value="Dollar" >Dollar</option>
<option value="Rupees">Rupees</option>
<option value="Euro">Euro</option>
<option value="Yen">Yen</option>
<option value="Yuan">Yuan</option>
</select></td>
<td class="tdLabel"><label for="" style="margin-left:208px" >IFSC :</label></td>
<td><input type="text" name="b_ifsc" value="" id="register_name" style="width:170px;"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:112px;">Initial Balance:</label></td>
<td><input type="text" name="b_inbalance" value="" id="register_name" style="width:170px;"/></td>
<td class="tdLabel"><label for="" style="margin-left:100px" >Account owner name: </label></td>
<td><input type="text" name="b_accownername" value="" id="register_name" style="width:170px;"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:176px;">Date:</label></td>
<td><input type="date" name="b_date" value="" id="register_name" style="width:170px;"/></td>
<td class="tdLabel"><label for="" style="margin-left:85px" >Account owner address:</label></td>
<td><textarea class="form-control" name="b_accowneraddress" rows="2" cols="19"></textarea></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:33px;">Minimum allowed balance:</label></td>
<td><input type="text" name="b_minAllowedbal" value="" id="register_name" style="width:170px;"/></td>
<td class="tdLabel"><label for="" style="margin-left:85px" >Bank Account GL Code: </label></td>
<td><input type="text" name="b_glcode" value="" id="register_name" style="width:170px;"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:33px;">Minimum desired balance: </label></td>
<td><input type="text" name="b_minDesiredbal" value="" id="register_name" style="width:170px;"/></td>
<td class="tdLabel"><label for="" style="margin-left:88px" >Bank Charges Account: </label></td>
<td><input type="text" name="b_chargesaccount" value="" id="register_name" style="width:170px;"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td class="tdLabel"><label for="" style="margin-left:160px" >Status: </label></td>
<td>
<select name="b_status" style="width:170px;height:25px;">
<option >Open</option>
<option >Close</option>
</select></td>
<td class="tdLabel"><label for="" style="margin-left:200px;">State :</label></td>
<td><select name="b_state" style="width:170px;height:25px;">
<option >Karnataka</option>
<option >kerala</option>
</select></td>
</tr>
</table>
<br>
<table>
<tr>
<!-- <td class="tdLabel"><label for="" style="margin-left:168px;">State :</label></td>
<td><input type="text" name="b_state" value="" id="register_name" style="width:160px;"/></td> -->
<td class="tdLabel"><label for="" style="margin-left:510px" >Account address :</label></td>
<td><textarea class="form-control"name="b_accaddress" rows="2" cols="19
"></textarea></td>
</tr>
</table>
<b></b>
<a onclick="myFunction()"><input type="button" class="btn btn-info" value="close " style="margin-left:900px;background:#204b58;" /></a>
</div> </div>
</div>
<%
String id=request.getParameter("b_id");
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/currency", "root", "root");
Statement st=conn.createStatement();
int i=st.executeUpdate("DELETE FROM bankaccount WHERE b_id="+id);
out.println("");
}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>
</div>
</div>
</div>
</div>
</section>
<%-- <% }else{
response.sendRedirect("login.jsp");
} %> --%>
<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$('[data-type="adhaar-number"]').keyup(function() {
var value = $(this).val();
value = value.replace(/\D/g, "").split(/(?:([\d]{4}))/g).filter(s=s.length > 0).join("-");
$(this).val(value);
});
$('[data-type="adhaar-number"]').on("change, blur", function() {
var value = $(this).val();
var maxLength = $(this).attr("maxLength");
if (value.length != maxLength) {
$(this).addClass("highlight-error");
alert("Aadhar card number not valid");
} else {
$(this).removeClass("highlight-error");
}
});</script>
</form>
</div>
</body>
</html>