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

📄 personupdii.jsp

📁 是一个用jsp做的公司人事管理系统
💻 JSP
字号:
<%@ page language="java" import="java.sql.*" contentType="text/html;charset=gb2312"%>
<jsp:useBean id="db" scope="page" class="opendb.opendb"/>
<%
String getpersonID=(String)session.getAttribute("personID");
 String getID=request.getParameter("ID").trim();						
 int getweb=Integer.parseInt(request.getParameter("web"));
int getmarries=Integer.parseInt(request.getParameter("marries")); 
String getschool=new String((request.getParameter("school")).getBytes("ISO8859-1"),"gb2312");
String getlevel= new String((request.getParameter("level")).getBytes("ISO8859-1"),"gb2312");
//String getschool=request.getParameter("school").trim();
//String	getlevel = request.getParameter("level").trim();
String	gettelephone=request.getParameter("telephone").trim();
String getmtel=request.getParameter("mtel").trim();
String getroom=request.getParameter("room").trim();
String getpassword = request.getParameter("password").trim();
String getusername=request.getParameter("username").trim();
String sql1="UPDATE wglPERSON SET EMP_DEPT = '" + getID + "' ,EMP_WEB = " + getweb + ",EMP_MARRY = " + getmarries + " ,EMP_SCHOOL = '" + getschool + "',EMP_EDUATION = '" + getlevel + "',EMP_ADRESS = '" + getroom + "',EMP_TEL = '" + gettelephone + "',EMP_HANDTEL = '" + getmtel + "',EMP_USERNAME = '" + getusername + "',EMP_PASSWORD = '" + getpassword + "' WHERE  EMP_CODE='"+ getpersonID +"'";
ResultSet rs1=db.executeQuery(sql1);
String sql2="select * from wglPERSON";
ResultSet rs2=db.executeQuery(sql2);
%>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<SCRIPT LANGUAGE="JavaScript">

function link(vid){
	document.S_form.udp.value =vid;
	document.S_form.action="personUpdI.jsp";
	document.S_form.submit();	
}
function del(vid){
    if (confirm("Are you sure to delete?"))
	{
	document.S_form.del.value =vid;
	document.S_form.action="personDel.jsp";
	document.S_form.submit();
	}	
}


</script>
<body background="/DSN/b.files/bj.gif">
  <form id="S_form" name="S_form" method="post" action="" >
  <table border=1 align="center" bordercolor="#008000">
    <tr bgcolor="#00CCFF"> 
      <td width="10%" height="16" > 
        <p align="center">人员ID</p></td>
      <td width="10%" height="16"> 
        <p align="center">人员姓名</p></td>
      <td width="10%" height="16"> 
        <p align="center">部门号</p></td>
      <td width="10%" height="16"> 
        <p align="center">性别</p></td>
      <td width="5%" height="16"> 
        <p align="center">权限</p></td>
      <td width="10%" height="16"> 
        <p align="center">婚姻状况</p></td>
      <td width="10%" height="16"> 
        <p align="center">毕业学校</p></td>
      <td width="10%" height="16"> 
        <p align="center">学历</p></td>
      <td width="10%" height="16"> 
        <p align="center">电话</p></td>
      <td width="10%" height="16"> 
        <p align="center">手机</p></td>
      <td width="10%" height="16"> 
        <p align="center">用户名</p></td>
      <td width="10%" height="16"> 
        <p align="center">密码</p></td>
		<td width="10%" height="16"> 
        <p align="center">修改</p></td>
      <td width="10%" height="16"> 
        <p align="center">删除</p></td>
</tr>
<%        while(rs2.next())
            {
			String personID=rs2.getString("EMP_CODE");
			String personname=rs2.getString("EMP_NAME");
			String ID=rs2.getString("EMP_DEPT");
			int sex=rs2.getInt("EMP_SEX");
            int web=rs2.getInt("EMP_WEB");
			int marry=rs2.getInt("EMP_MARRY");
			String school=rs2.getString("EMP_SCHOOL");
			String level=rs2.getString("EMP_EDUATION");
			String telephone=rs2.getString("EMP_TEL");
			String mtel=rs2.getString("EMP_HANDTEL");
			String username=rs2.getString("EMP_USERNAME");
			String password=rs2.getString("EMP_PASSWORD");
		
%>	
<tr><td width="10%" height="16" ><p align="center"><%=personID%></p></td>
<td width="10%" height="16" ><p align="center"><%=personname%></p></td>
<td width="10%" height="16" ><p align="center"><%=ID%></p></td>
<td width="10%" height="16" ><p align="center"><%if(sex==0)
													   {out.print("男");}
														else
														{out.print("女");}%></p></td>
<td width="5%" height="16" ><p align="center"><%=web%></p></td>
<td width="10%" height="16" ><p align="center"><%if(marry==0)
                                                 {out.print("是");}
														else
														{out.print("否");}%></p></td>
<td width="10%" height="16" ><p align="center"><%=school%></p></td>
<td width="10%" height="16" ><p align="center"><%=level%></p></td>
<td width="10%" height="16" ><p align="center"><%=telephone%></p></td>
<td width="10%" height="16" ><p align="center"><%=mtel%></p></td>
<td width="10%" height="16" ><p align="center"><%=username%></p></td>
<td width="10%" height="16" ><p align="center"><%=password%></p></td>
<td align="center" width="10%"><font size="2" color="000000"><a HREF="javascript:link('<%=((String)(personID)).trim()%>')">Y</a></font></td>
<td width="9%" align="center"><font size="2" color="000000"><a HREF="javascript:del('<%=((String)(personID)).trim()%>')">Y</a></font></td>
</tr>
 

  <%
    }
	%>
	 </table>
<p align="right">&nbsp;</p>
  <div align="center"><a href="adminBack.jsp"><font size="5" face="华文新魏">返回</font></a> 
  </div>
  <p align="right">&nbsp;</p>
  <input type="hidden" id="udp" name="udp">
  <input type="hidden" id="del" name="del">
</form>
</body>
</html>

⌨️ 快捷键说明

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