要求如题,希望在用户连续登陆三次失败后锁定当前登陆账户,谁有过类似的开发啊?急求解决方案啊

解决方案 »

  1.   

     if (emb.IsValidUser(txtUserName.Text, password))
                    {
                       
                        user_id = txtUserName.Text;
                        user_pass = txtPass.Text;
                        is_login_Success = true;
                        this.Close();
                    }
                    else
                    {
                        txtUserName.Text = "";
                        txtPass.Text = "";
                        txtUserName.Focus();
                        loginNumber++;
                        if (loginNumber == 3)
                        {
                            System.Windows.Forms.Application.Exit();
                        }
                        else
                        {
                            Utility.Utilty.GuiPanel.ShowInformationMsgBox(this, "错误的用户名或密码");
                        }
                    }
      

  2.   

    我也问这个问题来着,不过加一项让他30分钟后才能继续登陆?CSDN就是这种登陆模式
      

  3.   

    用Session,Cookie,状态保持好像也可以实现这样的功能。