📄 form_dictionaryedit.jsp
字号:
<%@ include file="../../include/configuration.jsp"%>
<%@ include file="../../include/authorizemanager.jsp"%>
<%@ page import="com.vere.form.item.*"%>
<%@ page import="com.vere.form.bean.*"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
ParameterUtils.setCharacterEncoding(request);
String status=ParameterUtils.getString(request,"status");
//修改
if(status.equals("edit"))
{
String id=ParameterUtils.getString(request,"id");//
String num=ParameterUtils.getString(request,"num");//编号
String code=ParameterUtils.getString(request,"code");//代码
String code_name=ParameterUtils.getString(request,"code_name");//名称
String description=ParameterUtils.getString(request,"description");//描述
if(num==null||!Check.isIntegerPlus(num)){
out.print("num 编号必须为整型数字");
return;
}
if(code==null||!Check.isIntegerPlus(code)){
out.print("code 代码必须为整型数字");
return;
}
if(code_name==null||code_name.equals("")){
out.print("code_name 名称不能为空");
return;
}
Form_dictionaryItem item=new Form_dictionaryItem();
item.setId(id);
item.setNum(num);
item.setCode(code);
item.setCode_name(code_name);
item.setDescription(description);
Form_dictionaryBean bean=new Form_dictionaryBean();
boolean b=bean.updateItem(item);
if(b){
response.sendRedirect("form_dictionary.jsp");
return;
}
}
String id=ParameterUtils.getString(request,"id");
Form_dictionaryBean bean=new Form_dictionaryBean();
Form_dictionaryItem item=bean.find(id);
%>
<html>
<head>
<title><%=titleName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../js/check.js"></script>
<link href="../../css/date.css" rel="stylesheet" type="text/css">
<script src="../../js/ShowDate.js"></script>
<script language="javascript">
init();
</script>
</head>
<script language="javascript">
function back()
{
location="form_dictionary.jsp";
}
function Check()
{
var form=form1;
if(!isIntegerPlus(form.num.value))
{
alert("编号必须为整型数字!");
form.num.focus();
return;
}
if(!isIntegerPlus(form.code.value))
{
alert("代码必须为整型数字!");
form.code.focus();
return;
}
if(form.code_name.value=="")
{
alert("请输入名称!");
form.code_name.focus();
return;
}
form.status.value="edit";
form.submit();
}
</script>
<body>
<form action="" method="post" name="form1">
<table class="firsttable">
<tr>
<td align="center" valign="top">
<table class="centertable">
<tr>
<td></td>
</tr>
<tr>
<td align="center" class="addborder">
<table class="addTable">
<tr align="center" >
<td colspan="2">
</td>
</tr>
<tr style="display:none;">
<td >编号:</td>
<td ><input name="num" type="text" id="num" value="<%=item.getNum()%>"></td>
</tr>
<tr >
<td >代码:</td>
<td ><input name="code" type="text" id="code" value="<%=item.getCode()%>"></td>
</tr>
<tr >
<td >名称:</td>
<td ><input name="code_name" type="text" id="code_name" value="<%=item.getCode_name()%>"></td>
</tr>
<tr >
<td width=100>描述:</td>
<td ><textarea name="description" cols="70" rows="10" id="description"><%=item.getDescription()%></textarea></td>
</tr>
<tr >
<td colspan="2" align="center">
<input name="Button" type="button" class="button" onClick="Check()" value="确定">
<input name="Submit2" type="button" class="button" onClick="back()" value="返回">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="status" >
<input type="hidden" name="id" value=<%=id%>>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -