<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Register TagPrefix="Diss_Cate" Namespace="Diss_vb" Assembly="Diss_vb" %>
<%@ Import Namespace="DissData_vb" %>
	<script language="vb" runat="server">
	sub Page_load(sender as object, e as EventArgs)
		GetCate.ServerName=Session("NowSQLServer").ToString()
		GetCate.Uid=Session("Nowuid").ToString()
		GetCate.Pass=Session("NowPassword").ToString()
		GetCate.DBName=Session("NowDBName").ToString()
		Session("NowCateID")=Request.QueryString("NowCateID")
		Session("NowCate")=Request.QueryString("NowCate")
		NowCate1.Text=Request.QueryString("NowCateID")'目前类别ID
		Session("StartDate")=Request.QueryString("StartDate")
		dim y as integer=Convert.ToInt32(Request.QueryString("CID"))'文章ID
		GetCate.FirstLoad=true
		dim NewDiss as DissSql = Ctype(Session("NowDissSqlvb"),DissSql)
		dim ReID as integer = NewDiss.GetReplyID(y.ToString())'取得回复ID
		ReplyID.Text=ReID.ToString()'置于隐藏控制项
		Dim Row as DataRow=NewDiss.GetArticleRow(y)'取得文章记录
		Cname.Text=Row("send").ToString()'显示相关信息
		Subj.Text=Row("subject").ToString()
		nowtime.Text=Row("nowtime").ToString()
		Body.Text=Row("body").ToString()
		Session("NowRow")=Row
	end sub
	sub Rep_Click(sender as object,e as EventArgs)
		Response.Redirect("Reply.aspx?NowCateID=" & Session("NowCateID") & "&NowCate=" & Session("NowCate") & "&NowAID=" & ReplyID.Text)
	end sub
	sub ToNew_Click(sender as object,e as EventArgs)
		Response.Redirect("WriteNew.aspx")
	end sub
	sub Get_Click(sender as object,e as CommandEventArgs)
		if GetCate.NowSelect.ToString()=NowCate1.Text then
			Response.Redirect("Showsbj.aspx?NowCateID=" & Session("NowCateID").ToString() & "&GetSession=True&StartDate=" & Session("StartDate").ToString())
		else
			Response.Redirect("Showsbj.aspx?NowCateID=" & GetCate.NowSelect.ToString() & "&StartDate=" & Session("StartDate").ToString())
		end if
	end sub
	</script>
</head>
<body background="../../../../images/winback.gif">
<form runat="server">
<p><Diss_Cate:GetCate ID="GetCate" oncommand="Get_Click" Runat="server" />
<p><asp:LinkButton Text="发表新意见" id="ToNew" onclick="ToNew_Click" runat="server" />　<asp:LinkButton Text="回复本信" id="Rep" onclick="Rep_Click" runat="server" /><p>
<table><tr><td width="70">发信人:</td><td><asp:label ID="Cname" Runat="server" /></td></tr>
<tr><td>主题:</td><td><asp:Label ID="Subj" Runat="server" /></td></tr>
<tr><td>时间:</td><td><asp:Label ID="nowtime" Runat="server" /></td></tr>
<tr><td valign="top">本文:</td><td><asp:Label ID="Body" Runat="server" /></td></tr>

</table>
<asp:Label id="Msg" Runat="server" />
<asp:Label id="NowCate1" Visible="false" Runat="server" />
<asp:Label id="ReplyID" Visible="false" Runat="server" />
</form>
</body>