Esempio n. 1
0
        public ViewResult OnUpdate(User user)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View("Update"));
                }

                _accountService.ProcessUpdate(user);

                HttpContext.Session.Remove("principal");
                HttpContext.Session.Add("principal", user);

                return(View("AccountInfo", user));
            }catch (Exception e)
            {
                ViewBag.Error = e.Message;
                Console.WriteLine(e.StackTrace);
                return(View("Update"));
            }
        }