예제 #1
0
        //sec_comment: this method control switches off AutoLogin at sign out
        public void SignOut_PreRender(object sender, System.EventArgs e)
        {
            UI.SignInState state = new SignInState();
            this.ForgetSignInButton.Button.Enabled = (state.IsUNToRemember || state.IsPassToRemember);
            string isAutoLogin = BaseClasses.Utils.NetUtils.GetCookie(NetUtils.CookieAutoLogin());

            if ((isAutoLogin == null) || (isAutoLogin == ""))
            {
                return;
            }
            else if (isAutoLogin.ToLower() == "true")
            {
                BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieAutoLogin(), "False");
            }
        }
예제 #2
0
        // Write out the DataSource properties and methods


        // Write out event methods for the page events

        // event handler for Button
        public void ForgetSignInButton_Click_Base(object sender, EventArgs args)
        {
            SignInState state = new SignInState();

            BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieUserName(), "");
            BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookiePassword(), "");
            state.IsUNToRemember   = false;
            state.IsPassToRemember = false;
            BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieRememberName(), Boolean.FalseString);
            BaseClasses.Utils.NetUtils.SetCookie(NetUtils.CookieRememberPassword(), Boolean.FalseString);
            try {
            } catch (Exception ex) {
                this.ErrorOnPage = true;

                // Report the error message to the end user
                BaseClasses.Utils.MiscUtils.RegisterJScriptAlert(this, "BUTTON_CLICK_MESSAGE", ex.Message);
            } finally {
            }
        }