Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Setting up the server side backend for database related stuffs
            AppDomain.CurrentDomain.SetData("DataDirectory", DatabaseHandler.GetAppDataPath());
            User user = Help.GetUserSession(Session);

            if (user != null)
            {
                FillLogout();
            }

            if (!Page.IsPostBack)
            {
                CheckPermissions(user);
            }

            //if (user == null || user.PermissionLevel <= 1)
            //{
            //    Menu1.Items.Remove(Menu1.FindItem("Admin"));
            //    Menu1.Items.Remove(Menu1.FindItem("Referee"));
            //}
            //else
            //{
            //    if (user.PermissionLevel < 3)
            //    {
            //        Menu1.Items.Remove(Menu1.FindItem("Admin"));
            //    }
            //    if (user.PermissionLevel < 2)
            //    {
            //        Menu1.Items.Remove(Menu1.FindItem("Referee"));
            //    }
            //}
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     //Setting up the server side backend for database related stuffs
     AppDomain.CurrentDomain.SetData("DataDirectory", DatabaseHandler.GetAppDataPath());
 }