예제 #1
0
        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");
            }
        }
예제 #2
0
 public ActionResult ResetPassword()
 {
     ResetPasswordBindingModel model = new ResetPasswordBindingModel();
     model.SetSharedData(User);
     return View(model);
 }