<%@ 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)
		Dim Row as DataRow = Ctype(Session("NowRow"),DataRow)
		Session("NowAID")=Request.QueryString("NowAID")'回复ID
		if IsPostBack=false then
			Cname.Text=Session("NowMan").ToString()
			subj.Text="回复：" & Row("subject").ToString()
			Cate.Text=Request.QueryString("NowCate")
			oldBody.Text=Row("body").ToString()
		end if
	end sub
	sub ok_click(sender as object,e as EventArgs)'保存
		Dim NowDissSQL as DissSql = Ctype(Session("NowDissSQLvb"),DissSql)
		Dim x as integer = NowDissSQL.GetMaxID()
		Dim k as Boolean = NowDissSQL.SaveToArticle(x,Convert.ToInt32(Session("NowAID").ToString()),subj.Text,Cname.Text,ReplyBody.Text,Convert.ToInt32(Session("NowCateID").ToString()),Session("NowID").ToString())
		if k=true then
			Response.Redirect("ShowSbj.aspx?NowCateID=" & Session("NowCateID"))
		else
			Msg.Text="发生错误，无法保存"
		end if
	end sub
	sub cel_click(sender as object,e as EventArgs)'取消
		Response.Redirect("showsbj.aspx?NowCateID=" & Session("NowCateID"))
	end sub
	</script>
</head>
<body background="../../../../images/winback.gif">
<form runat="server"><table><tr><td width="170">大名：<asp:textbox columns="15" ID="Cname" Runat="server" /></td><td width="350">电子邮件地址：<asp:textbox columns="30" ID="Email" Runat="server" /></td></tr>
<tr><td width="350" colspan="2">主题：<asp:textbox columns="40" ID="subj" Runat="server" /></td></tr>
<tr><td width="250">本文类别：<asp:Label ID="Cate" Runat="server" /></td></tr>
</table>
<hr>
<table>
<tr><td valign="top" width="250" colspan="2">引述内容：<br><asp:label id="oldBody" runat="server" /></td>
<td valign="top">回复内容：<br><asp:Textbox ID="ReplyBody" Rows="15" Columns="45" TextMode="MultiLine" Runat="server" /><br>
<asp:button id="ok" runat="server" onclick="ok_click" text="确定" />  <asp:button id="cel" runat="server" onclick="cel_click" text="取消" />
<br><asp:Label id="Msg" Runat="server" />
</td></tr>
</table>
</form>
</body>