コード例 #1
0
        public void SmsCode_OnClick(object sender, EventArgs e)
        {
            var smsCode  = TbSmsCode.Text;
            var userName = ViewState["UserName"];
            var code     = DbCacheManager.GetValueAndRemove($"BaiRong.BackgroundPages.FrameworkFindPwd.{userName}.Code");

            if (smsCode != code)
            {
                LtlMessage.Text = GetMessageHtml("找回密码错误:短信验证码不正确", true);
                return;
            }

            LtlPageTitle.Text            = "重设密码";
            LtlMessage.Text              = string.Empty;
            PhStepAccount.Visible        = false;
            PhStepSmsCode.Visible        = false;
            PhStepChangePassword.Visible = true;
        }
コード例 #2
0
ファイル: ServiceManager.cs プロジェクト: yankaics/cms-1
        public static void SetServiceOnline(bool isOnline)
        {
            if (isOnline)
            {
                var cacheValue = CacheManager.GetCache(CacheKeyStatus) as string;
                if (TranslateUtils.ToBool(cacheValue))
                {
                    return;
                }

                DbCacheManager.RemoveAndInsert(CacheKeyStatus, DateTime.Now.ToString(CultureInfo.InvariantCulture));
                CacheManager.SetCache(CacheKeyStatus, true.ToString(), DateTime.Now.AddMinutes(10));
            }
            else
            {
                DbCacheManager.GetValueAndRemove(CacheKeyStatus);
                ClearStatusCache();
                ClearIsPendingCreateCache();
                ClearTaskCache();
            }
        }
コード例 #3
0
        public void RemoveDbCache()
        {
            var cacheKey = GetTableNameNameValueCollectionDbCacheKey();

            DbCacheManager.GetValueAndRemove(cacheKey);
        }