insertcompanyaccount.jsp

来自「(Java+SQL)-大型企业JAVA的ERP系统」· JSP 代码 · 共 68 行

JSP
68
字号
<jsp:useBean id="account" class="src.wuyang.CompanyAccount" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>

<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<%	}
%>

<html>
<head>
<title>InsertCompanyAccount</title>
<link rel="stylesheet" href="../pub/style.css">
<script language ="javascript" src='../pub/pub.js' type=text/javascript></script>
</head>
<%!String companyId;%>
<%!String mode;%>
<%
	companyId = request.getParameter("companyId");
	mode = request.getParameter("mode");

	if (request.getParameter("insert")!=null && mode.equals("insert") ){ 
		account.setGlobal(global);	
%>
<jsp:setProperty name="account" property="*" />
<%
	int rtcode = account.insert();

	if(rtcode >= 0) {
%>
<jsp:forward page="InsertCompanyAccount.jsp"> 
	<jsp:param name="mode" value="ok" />
</jsp:forward>
<% 	
	}else {  
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>

<%  
	}  
}

	if (mode!= null && mode.equals("ok")){
%>
记录插入成功!!
<%
	}
%>
<body>
<form method="post">
	<input type="hidden" name="mode" value="insert"/> 
	公司编码:<input type="hidden" name="companyId" value="<%=companyId%>"><%=companyId%>
	<br>
	开户银行:<input type="text" name="bank" /> 
	<br>
	银行帐号:<input type="text" name="bankAccount" />
	<p>
	<input type="submit" name="insert" value="新增" />
	<input type="reset" value="重置" />

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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?