コード例 #1
0
        public void LoginOut()
        {
            //写入退出日志
            LogModel log = new LogModel();

            log.BusinessName  = "用户退出";
            log.OperationIp   = PublicMethod.GetClientIP();
            log.OperationTime = DateTime.Now;
            log.PrimaryKey    = "";
            log.UserId        = UserId;
            log.TableName     = "";
            log.OperationType = (int)OperationType.LoginOut;
            LogDal.Instance.Insert(log);


            CookieHelper.ClearUserCookie("", SysVisitor.CookieNameKey);
            UserName = null;
            UserId   = 0;
        }
コード例 #2
0
 /// <summary>
 /// 使变量名称为所传参数的cookie过期
 /// </summary>
 /// <param name="cookiename">cookie的变量的名称</param>
 public static void ClearCookie(string cookiename)
 {
     CookieHelper.ClearUserCookie(MD5Tool.getMd5Hash(cookiename), domin);
 }
コード例 #3
0
 /// <summary>
 /// 使变量名称为RED_USERID的cookie过期
 /// </summary>
 public static void ClearCookie()
 {
     CookieHelper.ClearUserCookie(MD5Tool.getMd5Hash("RED_USERID"), domin);
 }