📄 t_relation.inc
字号:
<%
'****************************************************************************************
' 员工主要社会关系
'****************************************************************************************
function Relations()
dim iCounter, sInforFirstLine, sInforOtherLines, sInfor, sHeader
dim crs, rs
dim sSerial, sRelation, sName, sCompany, sPolitical, sPhone
dim sSQL : sSQL = "select serial, relation, name, company, contact_phone, political_desc from t_relations" & _
" left join t_political on t_relations.political = t_political.political_id" & _
" where emp_serial = " & pEmpSerial
set crs = New CRecordset
set rs = crs.Open(dbLocal, sSQL)
sHeader = _
" <td align=center>称谓</td>" & _
" <td align=center>姓名</td>" & _
" <td align=center>所在单位及担任工作</td>" & _
" <td align=center>联系电话</td>" & vbLF
sInfor = ""
iCounter = 0
while Not rs.EOF
iCounter = iCounter + 1
sSerial = crs.GetValue("serial")
sRelation = crs.GetValue("relation")
sName = crs.GetValue("name")
sCompany = crs.GetValue("company")
sPolitical = crs.GetValue("political_desc")
sPhone = crs.GetValue("contact_phone")
sInfor = sInfor & _
"<tr bgcolor=""white"" height=25>" & vbLF & _
" <td align=center><input type=""text"" name=""name_" & iCounter & """ value=""" & sName & """" & _
" style=""text-align:center"" size=10 maxlength=10" & vbLF & _
" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
" <td align=center><input type=""text"" name=""relation_" & iCounter & """ value=""" & sRelation & """" & _
" style=""text-align:center"" size=4 maxlength=6" & 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=""phone_" & iCounter & """ value=""" & sPhone & """" & _
" 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 5 step 1
sInfor = sInfor & _
"<tr bgcolor=""white"" height=25>" & vbLF & _
" <td align=center>" & vbLF & _
"<input type=""text"" name=""name_" & j & """ style=""text-align:center"" size=10 maxlength=10" & vbLF & _
" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
" <td align=center>" & vbLF & _
"<input type=""text"" name=""relation_" & j & """ style=""text-align:center"" size=4 maxlength=6" & 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=""phone_" & j & """ style=""text-align:center"" size=10 maxlength=10" & vbLF & _
" onchange=""javascript:this.style.color='red';""></td>" & vbLF & _
"</tr>" & vbLF
next
if iCounter > 0 then '' 有记录
sInfor = _
"<tr bgcolor=""white"" height=25>" & vbLF & _
sHeader & vbLF & _
"</tr>" & vbLF & _
sInfor
end if
Relations = sInfor
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -