Example #1
0
 /// <summary>
 /// 退出登录
 /// </summary>
 public void exitLogin()
 {
     MySession.Clear();
     viewMenuQueue.Clear();
     //Application.LoadLevel("Login");
     setActiveUI(UIType.MainMenu);
 }
Example #2
0
 /// <summary>
 /// 是否登录
 /// </summary>
 /// <returns></returns>
 public bool islogin()
 {
     if (MySession.GetSessionStringValue("userName") == "")
     {
         return(false);
     }
     else if (Global.IsOut(HttpContext.Current.Session.SessionID))
     {
         MySession.Clear();
         return(false);
     }
     else
     {
         return(true);
     }
 }
Example #3
0
        protected override void OnInit(EventArgs e)
        {
            //判断是否登录
            string userid = MySession.GetSessionStringValue("UserId");

            if (userid == "")
            {
                MySession.Clear();
                //var path = Request.Url.LocalPath;
                var vMsg = "您的登录已过期,请重新登录";
                HttpContext.Current.Response.Write("<script>alert(\"" + vMsg + "\");window.top.location.href='/login.aspx';</script>");
                return;
            }


            base.OnInit(e);
        }