protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); // this was moved to the web.config file //Page.Theme = "Default"; /// In standalone Inquiry project, no FormsAuth and Session["User"] will be null. /// So just hardcode a User. All we need are DealerNo, EmpId, EmpTitle, Role for StandingsReport.aspx. var usr = (FoundationsUser)Session["User"]; if (usr == null) { usr = new FoundationsUser() { Dealerno = "040459", EmpID = "76657", Role = "8", EmpTitle = "Dealer Executive Management", UserID = "jwen" }; Session["User"] = usr; } }
public static void SetCurrentUser(FoundationsUser user) { // get the web context and make sure it is active System.Web.HttpContext context = System.Web.HttpContext.Current; if (context != null) // put the object in Session context.Session["User"] = user; }
public StandingsReportDispatcher(FoundationsUser user, IInquiryDataFetcher dataFetcher) : base(dataFetcher) { User = user; }
private AccessLevel GetUserAccessLevel(FoundationsUser user) { string title = user.EmpTitle; int role = Convert.ToInt32(user.Role); return GetRoleAccessLevel(role, title); }