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

📄 resume.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'****************************************************************************************
' 员工主要社会关系
'****************************************************************************************
function Resumes()
	dim iCounter, sInforFirstLine, sInforOtherLines, sInfor, sHeader
	dim crs, rs
	dim sSerial, sPeriod, sCompany, sCertifier


	dim sSQL : sSQL = "select serial, period, company, certifier from t_resume" & _
				" where emp_serial = " & pEmpSerial
	
	set crs = New CRecordset
	set rs = crs.Open(dbLocal, sSQL)

	sHeader = _ 
				"<tr bgcolor=""white"" height=25>" & vbLF & _
				"		<td align=center>年、月 ~ 年、月</td>" & _
				"		<td align=center>所在单位及担任工作</td>" & _
				"		<td align=center>证明人</td>" & vbLF & _
				"</tr>" & vbLF

	sInfor = ""
	iCounter = 0
	while Not rs.EOF
		iCounter = iCounter + 1
		sSerial = crs.GetValue("serial")
		sPeriod = crs.GetValue("period")
		sCompany = crs.GetValue("company")
		sCertifier = crs.GetValue("certifier")

		sInfor = sInfor & _
				"<tr bgcolor=""white"" height=20>" & vbLF & _
				"		<td style=""display:none""><input type=""hidden"" name=""serial_" & iCounter & """ value=""" & sSerial & """></td>" & _
				"		<td align=center><input type=""text"" name=""period_" & iCounter & """ value=""" & sPeriod & """" & _
													" style=""text-align:center"" size=20 maxlength=20" & vbLF & _ 
													" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"		<td align=left><input type=""text"" name=""company_" & iCounter & """ value=""" & sCompany & """" & _
													" style=""text-align:left"" size=50 maxlength=25" & vbLF & _
													" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"		<td align=center><input type=""text"" name=""certifier_" & iCounter & """ value=""" & sCertifier & """" & _
													" style=""text-align:center"" size=10 maxlength=10" & vbLF & _
													" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"</tr>" & vbLF
	
		rs.movenext
	wend
	crs.Close()
	
	dim j
	for j = iCounter + 1 to 10 step 1
		sInfor = sInfor & _
				"<tr bgcolor=""white"" height=20>" & vbLF & _
				"		<td align=center>" & vbLF & _
										"<input type=""text"" name=""period_" & j & """ style=""text-align:center"" size=20 maxlength=20" & vbLF & _
										" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"		<td align=left>" & vbLF & _
										"<input type=""text"" name=""company_" & j & """ style=""text-align:left"" size=50 maxlength=25" & vbLF & _
										" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"		<td align=center>" & vbLF & _
										"<input type=""text"" name=""certifier_" & j & """ style=""text-align:center"" size=10 maxlength=10" & vbLF & _
										" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
				"</tr>" & vbLF
	next

	Resumes = sHeader & sInfor
end function



function UpdateResume()
	dim i, j
	dim sSerial, sPeriod, sCompany, sCertifier
	dim sSQL

	for j = 1 to 10 step 1
		sSerial = GetParam("serial_" & j)
		if IsEmpty(sSerial) then exit for
	next

	'' j 之前需要更新,j之后需要插入
	for i = 1 to j - 1 step 1		'' 作更新操作
		sSerial = GetParam("serial_" & i)
		sPeriod = GetParam("period_" & i)
		sCompany = GetParam("company_" & i)
		sCertifier = GetParam("certifier_" & i)

		'' 如果三个字段的信息都为空,则作删除操作,否则作更新操作
		if IsEmpty(sPeriod) and IsEmpty(sCompany) and IsEmpty(sCertifier) then
				sSQL = "delete from t_resume where serial = " & ToSQL(sSerial, "Number")
		else
				sSQL = "update t_resume set period = " & ToSQL(sPeriod, "Text") & _
						", company = " & ToSQL(sCompany, "Text") & _
						", certifier = " & ToSQL(sCertifier, "Text") & _
						" where serial = " & ToSQL(sSerial, "Number")
		end if
		'response.write sSQL & "<br>"
		call ExecuteSQL(dbLocal, sSQL)
	next

	for i = j to 10 step 1			'' 作插入操作
		sPeriod = GetParam("period_" & i)
		sCompany = GetParam("company_" & i)
		sCertifier = GetParam("certifier_" & i)

		'' 如果三个字段的信息都为空,则不作插入操作
		if IsEmpty(sPeriod) and IsEmpty(sCompany) and IsEmpty(sCertifier) then
				'' do nothing
				sSQL = ""
		else
				sSQL = "insert into t_resume(emp_serial, period, company, certifier)" & _
					" values(" & ToSQL(pEmpSerial, "Number") & _
					", " & ToSQL(sPeriod, "Text") & _
					", " & ToSQL(sCompany, "Text") & _
					", " & ToSQL(sCertifier, "Text") & _
					")"
		end if
		if sSQL <> "" then
			'response.write sSQL & "<br>"
			call ExecuteSQL(dbLocal, sSQL)
		end if
	next
end function

%>

⌨️ 快捷键说明

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