예제 #1
0
        public object ChangePassword(PassWordChange passWordChange)
        {
            AccountUser retorno = new AccountUser();

            try
            {
                IUsuario usuario = this.model.ChangePassword(passWordChange.IdUsuario
                                                             , passWordChange.CurrentPassword
                                                             , passWordChange.NewPassword
                                                             , passWordChange.ConfirmPassword);

                retorno = this.model.GetAccount(usuario.UsuarioId);
            }
            catch (Exception ex)
            {
                var resp = new HttpResponseMessage(HttpStatusCode.InternalServerError)
                {
                    Content      = new StringContent(ex.Message),
                    ReasonPhrase = "Error!"
                };
                throw new HttpResponseException(resp);
            }


            var simpleResult = CleanUser(retorno);

            return(simpleResult);
        }
예제 #2
0
        private void btnChangePassword_Click(object sender, EventArgs e)
        {
            Form formChangePassword = new PassWordChange();

            formChangePassword.ShowDialog();
        }