⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modify_department_save.jsp

📁 jsp动态网站开发技术与实践 电子工业出版社 随书附赠源代码
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<title>欢迎光临企业办公平台</title>
		<link rel=stylesheet type=text/css href="../lib/enterprise.css">
		<jsp:useBean scope="page" id="Department" class="com.chapter15.Department" />

	</head>
	<body bgcolor="#F2F2F2">
	<div align=center>
<%
	request.setCharacterEncoding("gb2312");
	//获取所要修改的部门索引号,并将它转化为长整型
	String sDepartmentID = request.getParameter("DepartmentID");	
	long lDepartmentID = Long.parseLong(sDepartmentID);

	//获取所要修改的部门的旧信息
	Department.setDepartmentID(lDepartmentID);
	Department.init();
	//获取修改后的部门信息,并将它们赋值给Department类中的相应变量
	String sDepartmentName = request.getParameter("DepartmentName");
	String sManagerID = request.getParameter("ManagerID");
	long lManagerID = 0;
	if(sManagerID != null && sManagerID != "")
	{
		lManagerID = Long.parseLong(sManagerID);
	}
	
	Department.setDepartmentName(sDepartmentName);
	Department.setManagerID(lManagerID);	
	
	//修改部门信息
	if(Department.modify())
		{
			out.println("<p><font color=blue>修改部门成功</font></p>");
			out.println("<input type=button name=btn4 value=返回部门管理 onClick='javascript:window.location=\"department_management.jsp\"'>");
		}
		else
		{
			out.println("<p><font color=red>修改部门失败,请稍后重试</font></p>");
			out.println("<input type=button name=btn5 value=返回 onClick='window.history.go(-1)'>");
		}	
		%>


	</div>
	</body>
</html>

⌨️ 快捷键说明

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