public ActionResult ResetPassword(ResetPasswordBindingModel model) { try { if (!ModelState.IsValid) { return View(model); } var response = AsyncHelpers.RunSync<JObject>(() => ApiCall.CallApi("api/Admin/ChangePassword", User, model)); if (response == null || response is Error) return new HttpStatusCodeResult(HttpStatusCode.InternalServerError, (response as Error).ErrorMessage); else { model.SetSharedData(User); return RedirectToAction("ResetPassword"); } } catch (Exception ex) { return new HttpStatusCodeResult(HttpStatusCode.InternalServerError, "Internal Server Error"); } }
public ActionResult ResetPassword() { ResetPasswordBindingModel model = new ResetPasswordBindingModel(); model.SetSharedData(User); return View(model); }