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); }
private void btnChangePassword_Click(object sender, EventArgs e) { Form formChangePassword = new PassWordChange(); formChangePassword.ShowDialog(); }