请高手把asp这段方法翻译成C#方法

heyi10012 2009-11-13 10:43:28
<%
function getCommentHTML(byval FlowID,byval RecotdNO)

dim rs,FirstStep,flag
set rs = server.CreateObject("adodb.recordset")
set rs10 = server.CreateObject("adodb.recordset")
set Rs_Step = server.CreateObject("adodb.recordset")
if RecotdNO = "" or RecotdNO = 0 or cstr(RecotdNO) = "-1" or FlowID="" then
exit function
end if
CommentHTML = " <fieldset><legend>意见列表</legend><table width='98%' border=1 align=center cellpadding='0' cellspacing='0' bordercolor='#7f99cc' bordercolordark='#ffffff' >"
Rs_Step.open "select * from FlowStep where flow_id="&flowid&" and stepcommenttype=1 "&_
"and step_id in (SELECT distinct step_id FROM FLOW_BOM WHERE (FLOW_ID = "&flowid&")) order by Step_id",conn,3,1
do while not Rs_Step.eof
rs.open "select FlowPrecess.*,FlowStep.step_disc,userinfo.name,userinfo.mem_id as mem_id from FlowPrecess,FlowStep,userinfo where "&_"(SEND_DATE IS NOT NULL and back=0) and FlowPrecess.FLOW_ID = " & FlowID & " and FlowPrecess.RECODE_NO = " & RecotdNO & " "&_
"and FlowPrecess.step_id="&Rs_Step("step_id")&" and FlowPrecess.step_id = FlowStep.step_id and FlowPrecess.acept_id = userinfo.mem_id "&_
" and (FlowPrecess.remark is null or FlowPrecess.remark<>'') order by FlowPrecess.id desc",conn,1,1
CommentHTML = CommentHTML & "<tr height='25'><td width='15%' align='center' rowspan="&rs.recordcount&"><b>"&Rs_Step("STEP_DISC")&"</b></td>"
VCount=0
do while not rs.eof
if VCount=0 then
sql="select * from mem_detail where mem_id="&rs("mem_id")
rs10.Open sql,conn,3,1
flag=True
If Not rs10.EOF And Not rs10.BOF Then
If isnull(rs10("sign")) Then
flag=True
Else
flag=False
End If
End If
rs10.Close
CommentHTML = CommentHTML & "<td width='66%'>"&rs("remark")&"</td><td width='4%'><b>签名</b></td>"
if flag then
CommentHTML = CommentHTML & "<td align=center width='15%'>"&rs("name")&"<br>"&rs("send_date")&"</td></tr>"
else
CommentHTML = CommentHTML & "<td align=center width='15%'><img src=""/inc/ShowSign.asp?id="&rs("acept_id")&""">"&"<br>"&rs("send_date")&"</td></tr>"
end if
else
CommentHTML = CommentHTML & "<tr><td width='66%'>"&rs("remark")&"</td><td width='4%'><b>签名</b></td>"
if flag then
CommentHTML = CommentHTML & "<td align=center width='15%'>"&rs("name")&"<br>"&rs("send_date")&"</td></tr>"
else
CommentHTML = CommentHTML & "<td align=center width='15%'><img src=""/inc/ShowSign.asp?id="&rs("acept_id")&""">"&"<br>"&rs("send_date")&"</td></tr>"
end if
end if
VCount=VCount+1
rs.movenext
loop
rs.close
if VCount<1 then
CommentHTML = CommentHTML & "<td width='66%'> </td><td width='4%'><b>签名</b></td><td width='15%'>------</td></tr>"
end if
Rs_Step.movenext
loop
Rs_Step.close
CommentHTML = CommentHTML & "</table></fieldset>"
getCommentHTML=CommentHTML
end function
%>

可用Dreamweaver打开
...全文
134 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
heyi10012 2009-11-13
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 carpathia 的回复:]
CSDN不是偷懒的地方,你要是那么懒的话,就别做C#了
[/Quote]晕,就是没有搞过asp所以看不懂
viena 2009-11-13
  • 打赏
  • 举报
回复
路过
不搞asp已经10年了,但是看到asp代码还是很亲切的~
Carpathia 2009-11-13
  • 打赏
  • 举报
回复
CSDN不是偷懒的地方,你要是那么懒的话,就别做C#了
kensouterry 2009-11-13
  • 打赏
  • 举报
回复
楼上小白兔正解
加油馒头 2009-11-13
  • 打赏
  • 举报
回复
结贴率太低 哦也

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧