protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var user = GetUser(); if (user != null) { var log = OperationLog.GetLatestLoginop(user.UserID); if (log != null) { log.LogoutTime = DateTime.Now; log.Save(); } } Web.APPCode.CacheHelper.ClearCache(); FormsAuthentication.SignOut(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string op = Request.QueryString["op"]; if (op != null && op.Equals("logout")) { var user = GetUser(); if (user != null) { var log = OperationLog.GetLatestLoginop(user.UserID); if (log != null) { log.LogoutTime = DateTime.Now; log.Save(); } } } Web.APPCode.CacheHelper.ClearCache(); FormsAuthentication.SignOut(); } }