-
Notifications
You must be signed in to change notification settings - Fork 0
/
Site.Master.cs
27 lines (24 loc) · 953 Bytes
/
Site.Master.cs
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.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HNHUWO2.Classes;
namespace HNHUWO2
{
public partial class Site : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
// set session variables if needed.
if (MySession.Current.Role == null) MySession.Current.Role = Users.GetUserRole();
if (MySession.Current.FirstName == null) MySession.Current.FirstName = Users.GetFirstName();
// add a warming welcome message!
ltWelcomeMessage.Text = "Welcome, " + MySession.Current.FirstName;
// show menu options if user has the correct permissions
coordMenu.Visible = Users.IsUserCoordinator();
reportsMenu.Visible = designersMenu.Visible = adminMenu.Visible = Users.IsUserDesigner();
}
}
}