public IActionResult NovaSenha(NovaSenha novaSenha) { try { this.usuarioService.AtualizarSenha(User.GetUserID(), novaSenha.SenhaAnterior, novaSenha.Senha); ViewBag.Sucesso = "Senha atualizada com sucesso."; return(View()); } catch (Exception ex) { ModelState.AddModelError("", string.Format("Ocorreu um erro ao tentar atualizar a senha:{0}", ex.Message)); return(View()); } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { NovaSenha frm = new NovaSenha(); frm.Show(); }