public BaseController() { this.ViewBag.IsUserLogin = AuthMgr.HasLogin(); //加载登录信息 var userInfo = AuthMgr.ReadUserInfo(); if (userInfo != null) { CurrUser = new CurrentUser() { UserName = userInfo.UserID, UserSysNo = userInfo.UserSysNo, UserDisplayName = userInfo.UserDisplayName, AvatarImageUrl = userInfo.AvatarImageUrl, LoginTime = userInfo.LoginTime.ToString() }; if (userInfo.ExData != null) { CurrUser.MasterSysNo = (int)userInfo.ExData; } this.ViewBag.CurrUser = CurrUser; } }