Exemple #1
0
        protected void btnLogout_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();

            UserPool userPool = (UserPool)Application["UserPool"];

            userPool.RemoveUser(this.UcPage.UserName);

            killCookies();

            this.UcKioskPage.Refresh();
        }
Exemple #2
0
        protected void Logout()
        {
            UcUserArgs args = new UcUserArgs();

            args.UserName   = "";
            args.Password   = "";
            args.UserId     = this.UcPage.UserId;
            args.UserRoleId = this.UcPage.UserRoleId;
            OnLoggingOut(args);

            FormsAuthentication.SignOut();

            UserPool userPool = (UserPool)Application["UserPool"];

            userPool.RemoveUser(Page.User.Identity.Name);
        }
Exemple #3
0
        protected void dvControl_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
        {
            e.NewValues["user_role_id"] = userRoleId;
            e.NewValues["time_zone"]    = timeZone;

            String userName = e.OldValues["username"].ToString();

            UserPool userPool = (UserPool)Application["UserPool"];

            userPool.RemoveUser(userName);


            if (userName == this.UcAppPage.UserName)
            {
                FormsAuthentication.SignOut();
                this.Refresh();
            }
        }
        protected void doLogout(string message)
        {
            //----------------------------------------
            UcUserArgs args = new UcUserArgs();

            args.UserName   = "";
            args.Password   = "";
            args.UserId     = this.UcPage.UserId;
            args.UserRoleId = this.UcPage.UserRoleId;
            logout(args);
            //----------------------------------------


            FormsAuthentication.SignOut();

            UserPool userPool = (UserPool)Application["UserPool"];

            userPool.RemoveUser(ltUsername.Text);

            ltMessage.Text = message;
        }