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

📄 department.jsp

📁 一个hibernate加spring学习的例子
💻 JSP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<%@ taglib uri="/WEB-INF/htxx-tag.tld" prefix="hxtg"%>
<html>
  <head>
    <title>department</title>
    <hxtg:head></hxtg:head>
    
    <script type='text/javascript' src='../dwr/engine.js'></script>
    <script type='text/javascript' src='../dwr/util.js'></script>
    <script type='text/javascript' src='../hxtg/public/dwr/util.js'></script>
    <script type='text/javascript' src='../dwr/interface/DepartmentBus.js'></script>
  </head>
  <body onload="init()">
  	<hxtg:title text="部门信息">
  		<hxtg:titleitem><hxtg:button text="保存" onclick="save()"/></hxtg:titleitem>
  		<hxtg:titleitem><hxtg:button text="关闭" onclick="goback()"/></hxtg:titleitem>
  	</hxtg:title>
  	<hxtg:table type="single">
  		<hxtg:tr type="single">
  			<hxtg:td type="single" width="10%">部门名称</hxtg:td>
  			<hxtg:td type="single" width="80%"><input id="departmentName" type="text" style="width:90%"/></hxtg:td>
  		</hxtg:tr><input id="departmentId" type="hidden"/>
  	</hxtg:table>
  	<div id="ryDiv">
  	<hxtg:title text="员工信息" type="result"></hxtg:title>
  	<hxtg:table>
  		<hxtg:thead>
  			<hxtg:theaditem text="姓名" width="20%"></hxtg:theaditem>
  			<hxtg:theaditem text="性别" width="10%"></hxtg:theaditem>
  			<hxtg:theaditem text="入职时间" width="20%"></hxtg:theaditem>
  			<hxtg:theaditem text="婚姻状况" width="10%"></hxtg:theaditem>
  			<hxtg:theaditem text="职务类型" width="20%"></hxtg:theaditem>
  		</hxtg:thead>
  		<hxtg:tbody id="rybody">
  			<hxtg:tr id="rybody.pattern">
  				<hxtg:td><hxtg:item id="rybody.name"/></hxtg:td>
  				<hxtg:td><hxtg:item id="rybody.sex"/></hxtg:td>
  				<hxtg:td><hxtg:item id="rybody.hireDate"/></hxtg:td>
  				<hxtg:td><hxtg:item id="rybody.marriage"/></hxtg:td>
  				<hxtg:td><hxtg:item id="rybody.position"/></hxtg:td>
  			</hxtg:tr>
  		</hxtg:tbody>
  	</hxtg:table>
  	</div>
  </body>
  <script type="text/javascript">
  function init(condition){
  }
  function add(){
  	$("ryDiv").style.display="none";
  	var department = new Department();
  	setValues(department);
  }
  function edit(depid){
  	$("ryDiv").style.display="";
  	DepartmentBus.getDepartment(depid,function(vo){
  		setValues(vo);
  		fillTable("rybody",vo.employees,doEachRow);
  		});
  }
  function doEachRow(id,obj){
  	
  }
  function goback(){
  	window.parent.goback();
  }
  function save(){
  	var department = new Department();
  	dwr.util.getValues(department);
  	if(department.departmentId===''){department.departmentId=null;}
  	saveObj(department,function(department){
  			if(confirm("你是否确认保存'"+department.departmentName+"'?")){
  				DepartmentBus.updateDepartment(department);
  				goback();
  				window.parent.init();
  				return true;
  			}
  		});
  }
  </script>
</html>

⌨️ 快捷键说明

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