-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdminClass.aspx.cs
More file actions
27 lines (26 loc) · 876 Bytes
/
AdminClass.aspx.cs
File metadata and controls
27 lines (26 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EricLib.Utility;
public partial class AdminClass : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["user_acc"] == null)
{
Server.Transfer("Default.aspx?returnUrl=" + Request.FilePath, false);
}
else
{
user_cname.Text = Session["user_cname"].ToString();
user_role.Value = Session["user_role"].ToString();
if (EnumHelper.ToEnum<UserRole>(Convert.ToInt16(Session["user_role"])) == UserRole.Student)
{
if (Session["student_id"] == null)
Response.Redirect("Default.aspx?returnUrl=" + Request.FilePath, false);
}
}
}
}