Exemplo n.º 1
0
        public ActionResult Update(AccountModel model)
        {
            if (ModelState.IsValid)
            {
                var profile = AccountProfile.Current;
                profile.FirstName = model.FirstName;
                profile.LastName = model.LastName;
                profile.Birthday = model.Birthday;
                profile.Gender = model.Gender;

                profile.Save();
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }
Exemplo n.º 2
0
 public ActionResult Update()
 {
     var profile = AccountProfile.Current;
     var model = new AccountModel
     {
         FirstName = profile.FirstName,
         LastName = profile.LastName,
         Birthday = profile.Birthday,
         Gender = profile.Gender
     };
     return View(model);
 }