📄 yuangong.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>
<SCRIPT language=javascript src="css/init.js"></SCRIPT>
<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt}
body { font-family: "宋体"; font-size: 9pt}
select { font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{
if (myform.name.value == "")
{
alert("姓名不能为空!");
myform.name.focus();
return (false);
}
}
function SelectAll() {
for (var i=0;i<document.selform.selBigClass.length;i++) {
var e=document.selform.selBigClass[i];
e.checked=!e.checked;
}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>
<!--#include file="top.asp"-->
<% dim sql,rs
select case request("action")
case "add"
call SaveAdd()
case "modify"
call SaveModify()
case "del"
call delCate()
case "edit"
isEdit=True
call myform(isEdit)
case "view"
isEdit=True
call myform(isview)
case else
isEdit=False
call myform(isEdit)
end select
sub SaveAdd
set rs=server.createobject("adodb.recordset")
sql="select * from yuangong"
rs.open sql,conn,1,3
rs.addnew
rs("name") = trim(request.Form("name"))
rs("sex") = trim(request.Form("sex"))
rs("Title") = trim(request.Form("Title"))
rs("adr") = trim(request.Form("adr"))
rs("zip") = trim(request.Form("zip"))
rs("tel") = trim(request.Form("tel"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("email") = trim(request.Form("email"))
rs("dangan") = trim(request.Form("dangan"))
rs("minzu") = trim(request.Form("minzu"))
rs("bumen") = trim(request.Form("bumen"))
rs("zhiwu") = trim(request.Form("zhiwu"))
rs("gongzhong") = trim(request.Form("gongzhong"))
rs("ruchangtime") = trim(request.Form("ruchangtime"))
rs("yajin") = trim(request.Form("yajin"))
rs("baoxian") = trim(request.Form("baoxian"))
rs("biandong") = trim(request.Form("biandong"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('添加成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuangong.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub SaveModify
set rs=server.createobject("adodb.recordset")
sql="select * from yuangong where id="&request.Form("id")
rs.open sql,conn,1,3
rs("name") = trim(request.Form("name"))
rs("sex") = trim(request.Form("sex"))
rs("Title") = trim(request.Form("Title"))
rs("adr") = trim(request.Form("adr"))
rs("zip") = trim(request.Form("zip"))
rs("tel") = trim(request.Form("tel"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("email") = trim(request.Form("email"))
rs("dangan") = trim(request.Form("dangan"))
rs("minzu") = trim(request.Form("minzu"))
rs("bumen") = trim(request.Form("bumen"))
rs("zhiwu") = trim(request.Form("zhiwu"))
rs("gongzhong") = trim(request.Form("gongzhong"))
rs("ruchangtime") = trim(request.Form("ruchangtime"))
rs("yajin") = trim(request.Form("yajin"))
rs("baoxian") = trim(request.Form("baoxian"))
rs("biandong") = trim(request.Form("biandong"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuangong.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub delCate()
conn.execute("delete from yuangong where id in ("&Request.Form("selBigClass")&")")
response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=yuangong.asp"">"
response.end
end sub
%> <% sub myform(isEdit) %>
<TABLE width=98% align=center border="0" cellspacing="0" bordercolor="#D6D3CE">
<TBODY>
<TR>
<td align="center" valign="top">
<%if oskey="supper" or oskey="caiwu" then%>
<fieldset style="width:98%"><legend>
<%
set rs=server.createobject("adodb.recordset")
if isedit then
rs.open "select * from yuangong where id=" & request("id"),conn,1,1
response.write "编 辑 员 工 信 息"
else
response.write "添 加 员 工 信 息"
end if %></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<tr class="but">
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">姓名</td>
<td width="10%" height="12" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">性别</td>
<td width="5%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">学 历</td>
<td width="20%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">身份证号</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">电话号码</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">手机号码</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">年龄</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">婚否</td>
</tr>
<form name="reg" method="post" action="yuangong.asp" onSubmit="return Juge(this)" >
<tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'>
<% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>
<td height="18" align="center"><input name="name" type="text" size="10" value='<% if isedit then
response.write rs("name")
end if %>'></td>
<td align="center">
<select name="sex" size="1">
<option <% if isedit then
if rs("sex")="男" then
%> selected="selected"<%end if%><%end if%>>男</option>
<option <% if isedit then
if rs("sex")="女" then
%> selected="selected"<%end if%><%end if%>>女</option>
</select>
</td>
<td align="center">
<select name="Title" size="1">
<option <% if isedit then
if rs("Title")="小学" then
%> selected="selected"<%end if%><%end if%>>小学</option>
<option <% if isedit then
if rs("Title")="初中" then
%> selected="selected"<%end if%><%end if%>>初中</option>
<option <% if isedit then
if rs("Title")="高中" then
%> selected="selected"<%end if%><%end if%>>高中</option>
<option <% if isedit then
if rs("Title")="中专" then
%> selected="selected"<%end if%><%end if%>>中专</option>
<option <% if isedit then
if rs("Title")="大专" then
%> selected="selected"<%end if%><%end if%>>大专</option>
<option <% if isedit then
if rs("Title")="本科" then
%> selected="selected"<%end if%><%end if%>>本科</option>
</select>
</td>
<td align="center"><input name="adr" type="text" size="25" value='<% if isedit then
response.write rs("adr")
end if %>'></td>
<td align="center"><input name="tel" type="text" size="10" value='<% if isedit then
response.write rs("tel")
end if %>'></td>
<td align="center"><input name="Facsimile" type="text" size="10" value='<% if isedit then
response.write rs("Facsimile")
end if %>'></td>
<td align="center"><input name="Condition" type="text" size="10" value='<% if isedit then
response.write rs("Condition")
end if %>'></td>
<td align="center">
<select name="email" size="1">
<option <% if isedit then
if rs("email")="已婚" then
%> selected="selected"<%end if%><%end if%>>已婚</option>
<option <% if isedit then
if rs("email")="未婚" then
%> selected="selected"<%end if%><%end if%>>未婚</option>
</select>
</td>
</tr>
<tr class="but">
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">民族</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">部 门</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">职务</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">工种</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">押金</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">保险</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入厂时间</td>
<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">档案</td>
</tr>
<tr>
<td align="center"><input name="minzu" type="text" size="10" value='<% if isedit then
response.write rs("minzu")
end if %>'></td>
<td align="center"><select name="bumen" size="1" style='width:80'>
<% if isedit then%><option ><%=rs("bumen")%></option><%end if%>
<%
set rs3=server.createobject("adodb.recordset")
rs3.open "select * from department",conn,1,1
if not rs3.eof then
do while not rs3.eof
%>
<option <% if isedit then
if trim(rs3("depname"))=trim(rs("bumen")) then
%> selected="selected"<%end if%><%end if%>><%=rs3("depname")%></option>
<%
rs3.movenext
loop
end if
rs3.close
set rs3=nothing
%>
</select>
</td>
<td align="center"><input name="zhiwu" type="text" size="10" value='<% if isedit then
response.write rs("zhiwu")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -