using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
///PageBase 的摘要说明
/// </summary>
public class PageBase:Page
{
	public PageBase()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    protected override void OnInit(EventArgs e)
    {
        if ((int)PersonalId == 0)
        {
            Response.Redirect("~/login.aspx");
        }
        base.OnInit(e);

    }
    /// <summary>
    /// 用户id属性
    /// </summary>
    public int PersonalId
    {
        get
        {
            if (Session["uid"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            return ConvertHelper.GetInteger(Session["uid"]);
        }
        set { Session["uid"] = value; }
    }
}
