public ActionResult Edit(string FirstName, string LastName, string Description, string Qualifications, int?Rate, HttpPostedFileBase Picture) { var user = new logic.Rules.Authentication(Request.GetOwinContext()).GetLoggedInUser(); if (user == null) { return(RedirectToRoute("home")); } var model = new bat.logic.ViewModels.Profile.Edit(); try { model = _profileService.ProfileEditSave( user.ID, FirstName, LastName, Description, Qualifications, Rate, Picture); return(RedirectToAction("Index")); } catch (Exception ex) { ViewBag.Error = ex.Message; } return(View(model)); }
public ActionResult Edit() { var user = new logic.Rules.Authentication(Request.GetOwinContext()).GetLoggedInUser(); if (user == null) { return(RedirectToRoute("home")); } var model = new bat.logic.ViewModels.Profile.Edit(); try { model = _profileService.LoadEdit(user.ID); } catch (Exception ex) { ViewBag.Error = ex.Message; } return(View(model)); }