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

📄 emp_oa.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
function TableFormEmp()
	dim node,iRow
	iRow=0		
	iRow=DLookUp(conn,"select count(*) from t_node where mark=0")		
	if iRow<>0 then		
		node=selectOptions(conn, "select * from t_node where mark=0", "node_id", "node_desp", "")
	else
		node="<option value=""-1"">无记录</option>"
	end if

	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"" size=12 maxlength=12></td>" & vbLF & _
		"		<td align=center>性  别</td>" & _
		"		<td><select name=""gender"" style=""width:86"">" & _
						selectOptions(conn, "select * from t_gender", "gender_id", "gender_desc", "") & vbLF & _
						"</select></td>" & vbLF & _
		"		<td align=center>出生年月</td>"& _		
		"               <td class=tdValue nowrap><input type=""text"" name=""birthday"" 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", "") & 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", "") & vbLF & _
						"</select></td>" & vbLF & _				
		"		<td align=center>籍  贯</td>" & _
		"               <td class=tdValue nowrap><input type=""text"" name=""native"" 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"" 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", "") & 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"" 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 & _
						 node& vbLF & _
						"</select></td>" & vbLF & _		
		"		<td align=center>职  务</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""pos""  size=13 maxlength=10></td>" & vbLF & _
		"		<td align=center>职  称</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""title""  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""  size=12 maxlength=10></td>" & vbLF & _
		"		<td align=center>人事档案编号</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""dossierno""  size=13 maxlength=10></td>" & vbLF & _
		"		<td align=center>人事合同编号</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""contractno""  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"" size=45 maxlength=25></td>" & vbLF & _
		"		<td align=center>联系电话</td>" & vbLF & _
		"               <td class=tdValue nowrap><input type=""text"" name=""phone""  size=13 maxlength=12></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""></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""></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""></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>" &_
		"		&nbsp;&nbsp;&nbsp;" & vbLF
		
			

	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 & _	
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""emp_odl.asp"">离职员工查询</a>" & vbLF & _
			sTemp & vbLF & _
		"</td></tr>" & vbLF & _
		"</table>" & vbLF
End Function


function AddEmp()
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 = "insert into t_employee(name,gender,birthday,Idnumber,folk,native,address,education_level,specialty,pos"&_
	               ",title,node_id,political_status,contact_tel,engage_date,dossier_no,contract_no,achievements,training,certificate,dismissed) values ("&_
	               ToSQL(sEmpName, "Text") & _
		       "," & ToSQL(sGender, "Number") & _
		       "," & ToSQL(sBirthday, "Text") & _
		       "," & ToSQL(sId, "Text") & _
		       "," & ToSQL(sFolk, "Number") & _
		       "," & ToSQL(sNative, "Text") & _
		       "," & ToSQL(sHAddr, "Text") & _
		       "," & ToSQL(sEducation, "Number") & _ 
		       "," & ToSQL(sSpecialty, "Text") & _
		       "," & ToSQL(sPos, "Text") & _
		       "," & ToSQL(sTitle, "Text") & _
		       "," & ToSQL(sNode, "Number") & _
		       "," & ToSQL(sPolitical, "Number") & _
		       "," & ToSQL(sHPhone, "Text") & _
		       "," & ToSQL(sEngageDate, "Text") & _
		       "," & ToSQL(sDossierNo, "Text") & _
		       "," & ToSQL(sContractNo, "Text") & _
		       "," & ToSQL(sAchievements, "Text") & _
		       "," & ToSQL(sTraining, "Text") & _
		       "," & ToSQL(sCertificate, "Text") & ",0)"
		
	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_oa.asp"")</script>"
end function
%>

⌨️ 快捷键说明

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