public ActionResult cambiaPassword(ViewCambioPassword vcmbPassword) { if (Session["IdUsuario"] != null) { if (ModelState.IsValid == true) { usuario.cambiaPassword(vcmbPassword.IdUsuario, vcmbPassword.Password); return(RedirectToAction("Indexaf")); } else { return(View()); } } else { return(RedirectToAction("Indexaf", "Home")); } }
public ActionResult cambiaPassword(ViewCambioPassword vcmbPassword) { if (Session["IdUsuario"] != null && Convert.ToInt16(Session["IdPerfil"]) == 1) { if (ModelState.IsValid == true) { usuario.cambiaPassword(vcmbPassword.IdUsuario, vcmbPassword.Password); return RedirectToAction("Index"); } else { return View(); } } else { return RedirectToAction("Indexaf", "Home"); } }