Exemplo n.º 1
0
        /// <summary>
        /// 获取帖子信息
        /// </summary>
        protected void GetPost()
        {
            int postID = int.Parse(Request.QueryString["postID"]);

            ExtendBLL.Post p = new ExtendBLL.Post();

            post = p.GetModel(postID);

            if (post == null) { WriteBackScript("alert('当前主题已经被删除!');window.location.href='Index.aspx';"); }
        }
Exemplo n.º 2
0
        /// <summary>
        /// ����������
        /// </summary>
        protected void BindPost()
        {
            int postID = int.Parse(Request.QueryString["id"]);

            ExtendBLL.Post post = new ExtendBLL.Post();
            LabMS.Model.Post postInfo;

            postInfo = post.GetModel(postID);

            if (postInfo == null) { throw new Exception("�Բ���,�������ʵ�ҳ�治����"); }

            PosterName.Text = "����"; // TBD
            PostTitle.Text = postInfo.PostTitle;
            PostTime.Text = postInfo.PostRecordTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            PostContent.Text = Server.HtmlDecode(postInfo.PostContent);
        }