protected void Page_Load(object sender, EventArgs e)
 {
     user = (Staff)Session["User"];
     if (user != null)
     {
         userName = user.StaffName;
         userRole = user.Role.RoleName;
         CheckDelegatePerson();
         LogicUniversityDataModel.Delegate delegateStaff = authorityDelegationController.CheckStatusByStaffId(user.StaffId);
         delegateStatus = CheckDelegate(delegateStaff);
         if (!IsPostBack)
         {
             if (HttpContext.Current.User.Identity.IsAuthenticated)
             {
                 lblUserName.Text = userName;
                 lblUserRole.Text = userRole;
                 LoadMenu();
             }
             else
             {
                 lblUserName.Text = "No User Name";
             }
         }
     }
     else
     {
         Response.Redirect("~/Login.aspx");
     }
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     user           = (Staff)Session["User"];
     deleInfoStatus = delegateController.CheckStatusByStaffId(user.StaffId);
     BindGridView();
 }