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

📄 emp_oe.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
function TableFormEmp()
	
	dim sEmpName,sGender,sBirthday,sId,sFolk,sNative,sHAddr,sEducation,sSpecialty,sPos,sTitle,sNode,sPolitical
	dim sHPhone,sEngageDate,sDossierNo,sContractNo,sAchievements,sTraining,sCertificate
	
	dim sSQL
	sSQL = "select t1.name, t1.gender, t1.birthday, t1.Idnumber as id, " & _
				" t1.folk, t1.native,t1.address,t1.specialty, t1.education_level as education, " & _
				" t1.political_status as political, t1.node_id as node, t1.contact_tel as phone," & _
				" t1.pos, t1.engage_date, t1.title, t1.Dossier_no,t1.contract_no,t1.achievements,t1.training,t1.certificate " & _				
				" from t_employee t1" & _
				" where emp_id = " & pEmpid
				

'	response.write sSQL : response.end
	dim  rs
	
	set rs = OpenRS(conn, sSQL)
	
	'' 若找不到相应的记录,则跳转到出错页面
	if rs.EOF then
			Response.Clear
			Server.Transfer("../include/error.asp")
			Response.end
	end if

	sEmpName = GetValue(rs,"name")			'' 姓名
	sGender = GetValue(rs,"gender")			'' 性别
	sBirthday = GetValue(rs,"birthday")		'' 出生年月
	sId = GetValue(rs,"id")							'' 身份证号码
	sFolk =GetValue(rs,"folk")					'' 民族
	sNative = GetValue(rs,"native")				'' 籍贯
	sHAddr = GetValue(rs,"address")	'' 家庭地址	
	sEducation = GetValue(rs,"education")	'' 教育程度
	sSpecialty = GetValue(rs,"specialty")		'' 专业
	sPos = GetValue(rs,"pos")						'' 职务
	sTitle = GetValue(rs,"title")					'' 职称
	sNode = GetValue(rs,"node")		'' 部门标识		
	sPolitical = GetValue(rs,"political")			'' 政治面貌		
	sHPhone = GetValue(rs,"phone")	'' 住宅电话	
	sEngageDate = GetValue(rs,"engage_date")				'' 受聘时间
	sDossierNo=GetValue(rs,"dossier_no")   ''人事档案编号
	sContractNo=GetValue(rs,"contract_no") ''人事合同编号
        sAchievements=GetValue(rs,"achievements") ''主要业绩
        sTraining=GetValue(rs,"Training") ''培训记录
        sCertificate=GetValue(rs,"Certificate")''资格证书
	
	CloseRS(rs)
		
			
	TableFormEmp = _
		"<table cellspacing=1 cellpadding=3 bgcolor=""silver"" width=""100%"" border=0 style=""table-layout:fixed"">" & vbLF & _
		"	<tr style=""display:none"">" & vbLF & _
		"		<td width=95>这一行仅用于控制每一栏的宽度</td><td width=""16%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
		"		<td width=95>这一行仅用于控制每一栏的宽度</td><td width=""*"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _
		"		<td width=90>这一行仅用于控制每一栏的宽度</td><td width=""17%"">这一行仅用于控制每一栏的宽度</td>" & vbLF & _		
		"	</tr>" & vbLF & _
		"	<tr bgcolor=""#0040a0"" style=""color:white;font-weight:600"">" & vbLF & _
		"		<td colspan=6 align=center>员 工 基 本 情 况 表</td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>姓 名</td>"& _
		"               <td class=tdValue nowrap><input type=""text"" name=""name"" value=""" & sEmpName & """ size=12 maxlength=10></td>" & vbLF & _
		"		<td align=center>性  别</td>" & _
		"		<td><select name=""gender"" style=""width:86"">" & _
						selectOptions(conn, "select * from t_gender", "gender_id", "gender_desc", sGender) & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>出生年月</td>"& _		
		"               <td class=tdValue nowrap><input type=""text"" name=""birthday"" value=""" & sBirthday & """ size=13 maxlength=10></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _				
		"		<td align=center>政治面貌</td>" & vbLF & _
		"		<td><select name=""political"" style=""width:80"">" & vbLF & _
						selectOptions(conn, "select * from t_political", "political_id", "political_desc", sPolitical) & vbLF & _
						"</select></td>" & vbLF & _						
		"		<td align=center>民  族</td>" & _		
		"		<td class=tdValue nowrap><select name=""folk"" style=""width:86"">" & vbLF & _
						selectOptions(conn, "select * from t_folk", "folk_id", "folk_desc", sFolk) & vbLF & _
						"</select></td>" & vbLF & _				
		"		<td align=center>籍  贯</td>" & _
		"               <td class=tdValue nowrap><input type=""text"" name=""native"" value=""" & sNative & """ size=13 maxlength=10></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center  >身份证</td>" & _
		"               <td class=tdValue nowrap colspan=2><input type=""text"" name=""Id"" value=""" & sId & """ size=28 maxlength=18></td>" & vbLF & _
		"		<td align=center>最高学历</td>" & vbLF & _
		"		<td align=left  colspan=2><select name=""education"" style=""width:120"">" & vbLF & _
						selectOptions(conn, "select * from t_education", "education_id", "education_desc", sEducation) & vbLF & _
						"</select></td>" & vbLF & _		
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>专  业</td>"& vbLF & _
		"               <td colspan=5 class=tdValue nowrap><input type=""text"" name=""specialty"" value=""" & sSpecialty & """ size=76 maxlength=25></td>" & vbLF & _
		"	</tr>" & vbLF & _		
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>部  门</td>" & vbLF & _
                "		<td align=center><select name=""node"" style=""width:80"">" & vbLF & _
						selectOptions(conn, "select * from t_node where mark=0", "node_id", "node_desp", sNode) & vbLF & _
						"</select></td>" & vbLF & _		
		"		<td align=center>职  务</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""pos"" value=""" & sPos & """ size=13 maxlength=10></td>" & vbLF & _
		"		<td align=center>职  称</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""title"" value=""" & sTitle & """ size=13 maxlength=10></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>受聘时间</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""engagedate"" value=""" & sEngageDate & """ size=12 maxlength=10></td>" & vbLF & _
		"		<td align=center>人事档案编号</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""dossierno"" value=""" & sDossierNo & """ size=13 maxlength=10></td>" & vbLF & _
		"		<td align=center>人事合同编号</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""contractno"" value=""" & sContractNo & """ size=13 maxlength=10></td>" & vbLF & _
		"	</tr>" & vbLF & _		
		"	<tr bgcolor=white height=25>" & vbLF & _
		"		<td align=center>家庭地址</td>" & vbLF & _
		"               <td class=tdValue nowrap colspan=3><input type=""text"" name=""address"" value=""" & sHAddr & """ size=45 maxlength=25></td>" & vbLF & _
		"		<td align=center>联系电话</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""phone"" value=""" & sHPhone & """ size=13 maxlength=10></td>" & vbLF & _
		"	</tr>" & vbLF & _
		"	<tr bgcolor=white>" & vbLF & _
		"		<td align=center>主要业绩</td>" & vbLF & _
		"		<td valign=center colspan=5 ><textarea  name='achievements' cols=85 rows=6 style=""color:blue"">"&sAchievements&"</textarea></td>" & vbLF & _
		"	<tr bgcolor=white>" & vbLF & _
		"		<td align=center>培训记录</td>" & vbLF & _
		"		<td valign=center colspan=5 ><textarea name='training' cols=85 rows=6 style=""color:blue"">"&sTraining&"</textarea></td>" & vbLF & _		
		"	<tr bgcolor=white>" & vbLF & _
		"		<td align=center>资格证书</td>" & vbLF & _
		"		<td valign=center colspan=5 ><textarea name='certificate' cols=85 rows=6 style=""color:blue"">"&sCertificate&"</textarea></td>" & vbLF & _		
		"</table>"
end function





Function TableLink()
	dim sTemp : sTemp = ""

	
		sTemp = _
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""node.asp"">部门管理</a>" 
			

	TableLink = _
		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
		"<tr height=10>" & vbLF & _ 
		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
		"</tr>" & vbLF & _
		"<tr>" & vbLF &  _
		"	<td width=600>&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""emp_ol.asp"">在职员工查询</a>" & vbLF & _
		sTemp & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""emp_odl.asp"">离职员工查询</a></td>" & vbLF & _
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function


function UpdateEmp()
dim sEmpName,sGender,sBirthday,sId,sFolk,sNative,sHAddr,sEducation,sSpecialty,sPos,sTitle,sNode,sPolitical
	dim sHPhone,sEngageDate,sDossierNo,sContractNo,sAchievements,sTraining,sCertificate,sEmpid
	dim sSQL,sError
	
	sEmpid=GetParam("emp_id")
	sEmpName = GetParam("name")			'' 姓名
	sGender = GetParam("gender")			'' 性别
	sBirthday = GetParam("birthday")		'' 出生年月
	sId = GetParam("id")							'' 身份证号码
	sFolk = GetParam("folk")					'' 民族
	sNative = GetParam("native")				'' 籍贯
	sHAddr = GetParam("address")	'' 家庭地址	
	sEducation = GetParam("education")	'' 教育程度
	sSpecialty = GetParam("specialty")		'' 专业
	sPos = GetParam("pos")						'' 职务
	sTitle =GetParam("title")					'' 职称
	sNode = GetParam("node")		'' 部门标识		
	sPolitical =GetParam("political")			'' 政治面貌		
	sHPhone =GetParam("phone")	'' 住宅电话	
	sEngageDate =GetParam("engagedate")				'' 受聘时间
	sDossierNo=GetParam("dossierno")   ''人事档案编号
	sContractNo=GetParam("contractno") ''人事合同编号
        sAchievements=GetParam("achievements") ''主要业绩
        sTraining=GetParam("Training") ''培训记录
        sCertificate=GetParam("Certificate")''资格证书


	sSQL = "update t_employee set name = " & ToSQL(sEmpName, "Text") & _
		", gender = " & ToSQL(sGender, "Number") & _
		", birthday = " & ToSQL(sBirthday, "Text") & _
		", Idnumber = " & ToSQL(sId, "Text") & _
		", folk = " & ToSQL(sFolk, "Number") & _
		", native = " & ToSQL(sNative, "Text") & _
		", address = " & ToSQL(sHAddr, "Text") & _
		", education_level = " & ToSQL(sEducation, "Number") & _ 
		", specialty = " & ToSQL(sSpecialty, "Text") & _
		", pos = " & ToSQL(sPos, "Text") & _
		", title = " & ToSQL(sTitle, "Text") & _
		", node_id = " & ToSQL(sNode, "Number") & _
		", political_status = " & ToSQL(sPolitical, "Number") & _
		", contact_tel = " & ToSQL(sHPhone, "Text") & _
		", engage_date = " & ToSQL(sEngageDate, "Text") & _
		", dossier_no = " & ToSQL(sDossierNo, "Text") & _
		", contract_no = " & ToSQL(sContractNo, "Text") & _
		", achievements = " & ToSQL(sAchievements, "Text") & _
		", training = " & ToSQL(sTraining, "Text") & _
		", certificate = " & ToSQL(sCertificate, "Text") & _	
		" where emp_id = " & ToSQL(sEmpid, "Number")

	'response.write sSQL & "<br>"
	conn.Execute(sSQL)
	
	sError=ProcessError(conn)
	if sError="" then
		Response.Write _
				"<script language=""javascript"">" & vbLF & _
				"		alert(""员工信息已更新成功!"");" & vbLF & _
				"</script>" & vbLF		
		
	else
		Response.Write _
				"<script language=""javascript"">" & vbLF & _
				"		alert(""对不起,员工信息更新失败!原因:"&sError&");" & vbLF & _
				"</script>" & vbLF
		
	end if	
	response.write "<script language=vbscript>window.navigate(""emp_op.asp?emp_id="&sEmpid&""")</script>"
end function
%>

⌨️ 快捷键说明

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