📄 modifyposition.asp
字号:
<!--#include file="../includes/keepHouse.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<script language="javaScript">
function validate(){
var TargetDeptId = document.FormModifyPosition.TargetDeptId.value;
var TargetPositionId = document.FormModifyPosition.TargetPositionId.value;
if (TargetDeptId==""){
alert("请选择目标部门!");
return false;
}
if (TargetPositionId==""){
alert("请选择目标职位!");
return false;
}
}
</script>
</head>
<body>
<center>
<%
call insureID()
if session("PERSONNEL_ID")<>1 then
call noRight
end if
dim PERSONNEL_ID
PERSONNEL_ID=request("PERSONNEL_ID")
if PERSONNEL_ID="" then
call trigErr()
end if
sql= "SELECT Personnel.*, Department.DEPARTMENT AS Department, Department.DEPT_ID AS DeptId, " _
&"[Position].POSITION_NAME AS Position " _
&"FROM Personnel INNER JOIN Department " _
&"ON Personnel.DEPT_ID = Department.DEPT_ID INNER JOIN [Position] " _
&"ON Personnel.POSITION_ID = [Position].POSITION_ID " _
&"WHERE PERSONNEL_ID="&PERSONNEL_ID
call openDB()
rs.open sql,conn,1,1
if rs.eof then
call trigErr()
end if
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="50">
<tr>
<td width="100%"></td>
</tr>
</table>
<form name="FormModifyPosition" method="POST" action="saveHM.asp" onSubmit="javaScript:return validate();">
<input type="hidden" value="<%=PERSONNEL_ID%>" name="PersonnelId">
<table border="0" width="75%" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" bgcolor="#0000FF" height="35" align=left><img border="0" src="../images/back.gif"></td>
<td width="65%" bgcolor="#0000FF" height="35" align=center><b><font color="#FFFFFF">变更员工<%=rs("PERSON_NAME")%>的职位</font></b></td>
<td width="5%" bgcolor="#0000FF" height="35" align=right><img border="0" src="../images/Close2.gif"></td>
</tr>
</table>
<table border="1" width="75%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
<tr>
<td width="26%" bgcolor="#FCFCFC">原来部门</td>
<td width="49%" bgcolor="#FCFCFC"><%=rs("Department")%></td>
</tr>
<tr>
<td width="26%" bgcolor="#FCFCFC">原来职位</td>
<td width="49%" bgcolor="#FCFCFC"><%=rs("Position")%></td>
</tr>
<%
set rs=nothing
set rs=Server.CreateObject("AdoDb.Recordset")
sql="SELECT * FROM Department"
rs.open sql,conn,1,1
%>
<tr>
<td width="26%" bgcolor="#FCFCFC">目标部门</td>
<td width="49%" bgcolor="#FCFCFC">
<%
response.write"<select name=""TargetDeptId"">"
response.write "<option value="""" selected>--请选择--</option>"
while not rs.eof
response.write "<option value="""&rs("DEPT_ID")&""" >"&rs("DEPARTMENT")&"</option>"
rs.MoveNext
wend
response.write "</select>"
%>
</td>
</tr>
<%
set rs=nothing
set rs=Server.CreateObject("AdoDb.Recordset")
sql="SELECT * FROM Position"
rs.open sql,conn,1,1
%>
<tr>
<td width="26%" bgcolor="#FCFCFC">目标职位</td>
<td width="49%" bgcolor="#FCFCFC">
<%
response.write"<select name=""TargetPositionId"">"
response.write "<option value="""" selected>--请选择--</option>"
while not rs.eof
if rs("POSITION_ID")=1 then
rs.MoveNext
else
response.write "<option value="""&rs("POSITION_ID") _
&""" >"&rs("POSITION_NAME")&"</option>"
rs.MoveNext
end if
wend
response.write "</select>"
call closeDB()
%>
</td>
</tr>
<tr>
<input type="hidden" value="ModifyPosition" name="action">
<td width="53%" height=50 bgcolor="#EFEFEF" align=center colspan="2">
<input type="submit" value="提 交" name="Submit" class="buttonface">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -