public ActionResult PersonalDetails(LoggedInUserModel usermodel) { var mainImage = WebImage.GetImageFromRequest(); usermodel.UpdateImage(mainImage); usermodel.Update(); return View("Index"); }
public ActionResult UpdatePersonalDetails(LoggedInUserModel usermodel) { try { var image = WebImage.GetImageFromRequest(); usermodel.Update(); usermodel.UpdateImage(image); ShowSuccessMessage("Your details have been updated successfully."); return View(usermodel); } catch (ArgumentException) { ShowErrorMessage("Invalid file, unable to extract an image from the file provided."); return View(usermodel); } }
public ActionResult UpdatePersonalDetails() { var user = new LoggedInUserModel(); return View(user); }