protected override void Initialize(System.Web.Routing.RequestContext requestContext) { base.Initialize(requestContext); //if (requestContext.HttpContext.Session.IsNewSession) //{ if (this.SessionContext == null) { this.SessionContext = new WebSessionContext(MvcApplication.MySystem, requestContext.HttpContext.Session, MvcApplication.SessionFactory, requestContext.HttpContext.Request.UserHostAddress); BudgetConfiguration.CurrentConfiguration = BudgetConfiguration.GetConfiguration(SessionContext); } //this.SessionContext.CurrentLanguage = this.SessionContext.Configuration.DefaultLanguage; //} ViewBag.AppName = ApplicationName; if (this.SessionContext.User != null) { GetMenu(); GetAnnouncesByRole(); ViewBag.UserName = this.SessionContext.User.Person.CurrentName.FirstName.GetValue("th-TH"); ViewBag.DepartmentName = this.SessionContext.User.OrgUnit.CurrentName.Name.GetValue("th-TH"); ViewBag.AppName = CommonConstant.ApplicationName(Request); } else { GetAnonymousMenu(); } }
protected override void Initialize(System.Web.Routing.RequestContext requestContext) { base.Initialize(requestContext); BudgetConfiguration.CurrentConfiguration = BudgetConfiguration.GetConfiguration(SessionContext); ViewBag.AppName = ApplicationName; if (this.SessionContext.User != null) { GetMenu(); GetAnnouncesByRole(); ViewBag.UserName = this.SessionContext.User.Person.CurrentName.FirstName.GetValue(Formetter.LanguageTh); ViewBag.DepartmentName = this.SessionContext.User.OrgUnit.CurrentName.Name.GetValue(Formetter.LanguageTh); ViewBag.AppName = CommonConstant.ApplicationName(Request); } else { GetAnonymousMenu(); } }