首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请高手帮忙解决个小疑点

2012-03-02 
请高手帮忙解决个小问题functionShowDoc(Channel)intChannelIDChannel已经被采用的信息(不是公文的条目)i

请高手帮忙解决个小问题
function   ShowDoc(Channel)
intChannelID=Channel
'已经被采用的信息(不是公文的条目)
if   intChannelID=0   then
chrSQL= "Select   Top   5   intArticleID,intChannelID,chrTitle,datYear,datMonth,datDay,intPdfID   From   DOC   where     intChannelID <> 10   and   intChannelID <> 8   and   intChannelID <> 6   order   by   intArticleID   Desc "
end   if
if   intChannelID=8   then
chrSQL= "Select   Top   5   intArticleID,intChannelID,chrTitle,datYear,datMonth,datDay,intPdfID   From   DOC   WHere   intChannelID= "&   intChannelID   & "   or   intChannelID=10     order   by   intArticleID   Desc "
end   if
if   intChannelID=6   then
chrSQL= "Select   Top   5   intArticleID,intChannelID,chrTitle,datYear,datMonth,datDay,intPdfID   From   DOC   WHere   intChannelID= "&   intChannelID   & "       order   by   intArticleID   Desc "
end   if
Set   rsShow   =conn.Execute(chrSQl)
if   rsShow.EOF   or   rsShow.BOF   then
enrr   =enrr+ "   ·相应栏目没找到信息; <br> "
enrr   =enrr+ "   ·请提交或者采用相关信息来显示该部分内容; <br> "
response.write   enrr
else
do   while   not   rsShow.EOF
response.write   " <span   class= 'style9 '> · </span>   "
response.write   " <span   class= 'style3 '> <a   Target= '_blank '   href= 'readfile.asp?File= "&   rsShow( "intPdfID ")   & " '   "
if   Len(rsShow( "chrTitle "))> 18   then
response.Write   "Title= ' "&   rsShow( "chrTitle ")   & " '> "&   Left(rsShow( "chrTitle "),18)   & "... </a> </span> "
else
response.Write   "> "&   rsShow( "chrTitle ")   & " </a> </span> "
end   if
response.write   " <span   class= 'style4 '> ( "&   rsShow( "datYear ")   & "- "&   rsShow( "datMonth ")   & "- "&   rsShow( "datDay ")   & ") </span> "

if   blnHasPower( "公文签收 ")   then
'写出针对个人的快捷签收信息
chrSQL= "Select   intArticleID,chrReceive,BlnAuditing   from   Audit   Where   intArticleID= "&   rsShow( "intArticleID ")   & "   and   chrReceive= ' "&   session( "intOrgID ")   & " '   and   BlnAuditing= "&   False
Set   rsAudit   =conn.Execute(chrSQl)
if   rsAudit.EOF   and   rsAudit.BOF   then
response.write   " "
else
response.write   " <a   title= '请点击并签收此公文。 '   href= 'ViewDOC.asp?blnSubmit=True&Audit=True&Article= "&   rsShow( "intArticleID ")   & " '   onClick= " "return   confirm( '签收此条公文,确认么? '); " "> <img   src= 'images/audit.gif '   border=0> </a> "
end   if
rsAudit.Close
end   if
'如果需要个人签收且已经签收则写入以下信息


chrSQL= "Select   intArticleID,chrReceive,BlnAuditing   from   Audit   Where   intArticleID= "&   rsShow( "intArticleID ")   & "   and   BlnAuditing= "&   True
Set   rsAudit   =conn.Execute(chrSQl)
if   rsAudit.EOF   and   rsAudit.BOF   then
response.write   " <br> "
elseif   Instr(rsAudit( "chrReceive "),session( "chrOrgName "))> 0   then
response.write   " <font   color=darkred   title= '您所在的机构已经签收了该公文。 '> √ </font> <br> "
else
response.write   " <br> "
end   if
rsAudit.Close

rsShow.MoveNext
loop

rsShow.Close
Set   rsShow=nothing
end   if
end   function%>

这段代码是公文收发的一段显示代码,未签收的就显示“请签收”,已签收的就显示红色的“√”,但有个问题,就是已签收后,只有第一个签收的单位可以正确显示√,后面签收的就什么都不显示了,不知道哪里出问题了,请帮忙看看

[解决办法]
要循环取数据啊,如:

if rsAudit.EOF and rsAudit.BOF then
response.write " <br> "
else
do while not rsAudit.BOF

if Instr(rsAudit( "chrReceive "),session( "chrOrgName "))> 0 then
response.write " <font color=darkred title= '您所在的机构已经签收了该公文。 '> √ </font> <br> "
else
response.write " <br> "
end if

rsAudit.movenext
loop

rsAudit.Close

热点排行