📄 insertcountlist.jsp
字号:
<jsp:useBean id="countList" class="src.wuyang.CountList" 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>仓库编码信息</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../pub/style.css">
<script language ="javascript" src='../pub/pub.js' type=text/javascript></script>
</head>
<body>
<script language="JavaScript">
function VerifyInput(e)
{
if(isEmpty(e.quantity.value))
{
alert("请输入数量");
e.quantity.focus();
return false;
}
}
</script>
<%
String quantity=request.getParameter("quantity");
String mode = request.getParameter("mode");
System.out.println("*mode="+ mode);
if (request.getParameter("insert")!=null && mode.equals("insert") ){
countList.setGlobal(global);
%>
<jsp:setProperty name="countList" property="mark" />
<jsp:setProperty name="countList" property="quantity" />
<%
int rtcode = countList.insert();
if(rtcode >= 0) {
%>
<jsp:forward page="InsertCountList.jsp" >
<jsp:param name="success" value="ok" />
<jsp:param name="mode" value="ok" />
</jsp:forward>
<%
}else {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
}
}
%>
<%
if (request.getParameter("success") != null ){
int maxMarkId=countList.getMaxMarkId();
System.out.println("markId = "+maxMarkId);
%>
成功插入记录!!
<br>
欲修改刚才新增唛单吗?
<a href="CountListUpdate.jsp?markId=<%=maxMarkId%>">Yes</a>
<%
}
%>
<form method="POST" onsubmit="return VerifyInput(this);">
<input type="hidden" name="mode" value="insert"/>
唛头:<input type ="text" name="mark">
<br>
数量:<%=quantity%><input type="hidden" name="quantity" value=<%=quantity%>>
<p>
<input type="submit" name="insert" value="增加" />
<input type="reset" name="reset" value="重置" />
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -