using System;
using TABS.MailCarrier.WebSDK.Board;

public partial class Board_ViewSelector : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int articleId = WebParam.GetIntParamValue("article");
        Article article = new Article(articleId);
        article.Load();

        Board board = new Board(article.BoardID);
        if (board.Type == Board.BoardType.General)
        {
            Response.Redirect(string.Format("View.aspx?board={0}&article={1}&page=0", article.BoardID, articleId));
        }
        else if (board.Type == Board.BoardType.OneToOne)
        {
            Response.Redirect(string.Format("One2one/View.aspx?board={0}&article={1}&page=0", article.BoardID, articleId));
        }
    }
}