活动页面添加参赛作品瀑布流
[PumpkinHouse.git] / PumpkinHouseWeb / Discussion.aspx.cs
blob95fc42480c6a360c21a32a3b8a24c46583c89b36
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Web;
5 using System.Web.UI;
6 using System.Web.UI.WebControls;
7 using PumpkinHouseDatabase;
9 namespace PumpkinHouse
11 public partial class Discussion : System.Web.UI.Page
13 public int BoardId;
14 public string BoardName;
15 public long DiscussionId;
17 protected void Page_Load(object sender, EventArgs e)
19 if (!long.TryParse(Request.Params["DiscussionId"], out DiscussionId))
21 Response.Redirect("~/404.aspx");
23 using (DataUtils utils = new DataUtils(false))
25 DB_Discussion dis = utils.FindDiscussion(DiscussionId);
26 if (dis == null)
28 Response.Redirect("~/404.aspx");
30 BoardId = dis.Board_Id;
31 BoardName = dis.DB_Discussion_Board.Board_Name;
33 string subject = dis.Subject;
34 if (subject.Length > 15)
36 subject = subject.Substring(0, 15) + "...";
39 Page.Title = subject + " 话题 - 木头盒子讨论组";