public ActionResult EditAttorneyProfile(AttorneyProfileViewModel model) { if (ModelState.IsValid) { var profile = UserProfile.GetUserProfile(model.UserName); profile.LawFirm = model.LawFirm; profile.Phone = model.Phone; profile.AddressLine1 = model.AddressLine1; profile.AddressLine2 = model.AddressLine2; profile.City = model.City; profile.State = model.State; profile.Zip = model.Zip; profile.County = model.County; profile.Save(); return RedirectToAction("Profile", new {userName = model.UserName }); } model.SetCountySelectList(_questionRepository.Counties); return View("EditAttorneyProfile", model); }
public ActionResult EditAttorneyProfile(string userName) { var profile = UserProfile.GetUserProfile(userName); var model = new AttorneyProfileViewModel(profile); model.SetCountySelectList(_questionRepository.Counties); return View("EditAttorneyProfile", model); }