Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["user"] != null)
         {
             user = (UserInfo)Session["user"];
         }
         else
         {
             Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('您必须先登录!');window.location.href='login.aspx'", true);
         }
         txtMan.Text = user.Name;
         Department Depart = DepartmentManager.GetAllDepartementById(user.Department.Id);
         txtDept.Text = Depart.Departmentname;
     }
 }