using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Security.Principal; public partial class header : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Get Windows ID of user string logonUserName = Utilities.GetLoggedInUserID(User.Identity.Name); //string boardPortfolioName = ReadWriteManager.GetUserBoardPortfolio(); string boardPortfolioName = ""; bool isUserChair = false; string[] rolesArray; rolesArray = Roles.GetRolesForUser(logonUserName); if (rolesArray.Length >= 1) { foreach (string str in rolesArray) { if (str != "ChairBoardPortfolio") { if (boardPortfolioName == "") { boardPortfolioName = ReadWriteManager.GetUserBoardPortfolio(str); } else { boardPortfolioName = boardPortfolioName + ", " + ReadWriteManager.GetUserBoardPortfolio(str); } } else { isUserChair = true; } } if (isUserChair == true) { boardPortfolioName = boardPortfolioName + " Chair"; } } currTimeStampLabel.Text = "Today is " + Utilities.GetFormattedDateTime(); //lblHeader.Text = "You are logged in as " + Utilities.GetLoggedInUserID(User.Identity.Name) + " (" + boardPortfolioName + ")"; lblHeader.Text = "You are logged in as " + logonUserName + " (" + boardPortfolioName + ")"; //lblHeader.Text = WindowsIdentity.GetCurrent().Name; //Response.Write("User Authenticated " + User.Identity.IsAuthenticated.ToString() + "<br>"); } }