public ActionResult EditProfile() { var userSvc = new UserLogic(Ticket); ViewData.Model = userSvc.GetCurrent(); return View(); }
public ActionResult EditProfile(FormCollection form) { var userSvc = new UserLogic(Ticket); var userObj = userSvc.GetCurrent(); userObj.Name = form["name"]; userObj.PhoneNumber = form["phoneNumber"]; userObj.MobileNumber = form["mobileNumber"]; userObj.EmailAddress = form["emailAddress"]; userSvc.Save(userObj); Ticket.UserName = form["name"]; DisplayInformation("Your profile has been updated successfully."); return RedirectToAction("Profile"); }