Пример #1
0
 public override void OnAuthorization(AuthorizationContext filterContext)
 {
     if (filterContext.RouteData.Values["controller"].ToString() != "Auth")
     {
         SessionManger.CheckSessionState("UserInfo");
     }
 }
Пример #2
0
 /// <summary>
 /// 存入Session
 /// </summary>
 /// <param name="SessionName"></param>
 /// <param name="data"></param>
 protected void SetUser(string SessionName, object data)
 {
     SessionManger.SetSession(SessionName, data);
 }
Пример #3
0
 /// <summary>
 /// 读取Session
 /// </summary>
 /// <param name="SessionName"></param>
 /// <returns></returns>
 protected tbClientUser GetUser(string SessionName)
 {
     return(SessionManger.GetSession <tbClientUser>(SessionName));
 }