Ejemplo n.º 1
0
        private void changePasswd()
        {
            if (txtBoxNewPass.Text == txtBoxConfirmPass.Text)
            {
                string username = service.FindUsernameBySessionId(sessionId);

                DbUser user = new DbUser();
                user.Username = username;
                user.Password = txtBoxNewPass.Text;
                if (service.UpdatePassword(user))
                {
                    LoginForm form = new LoginForm();
                    form.txtUsername.Text = username;
                    form.ErrorLBL.Text = "Please Login with your new password";
                    form.ErrorLBL.ForeColor = Color.Green;
                    form.ErrorLBL.Show();
                    this.Hide();
                    form.Show();

                    service.Logout(sessionId);
                }
            }
            else
            {
                lbl.ForeColor = Color.Green;
                lbl.Text = "New Password do not match.";
            }
        }
Ejemplo n.º 2
0
 private void cancelBTN_Click(object sender, EventArgs e)
 {
     LoginForm login = new LoginForm();
     login.Show();
     this.Close();
 }