예제 #1
0
        public ActionResult ChangeMode(ChangeModeViewModel model)
        {
            var user = UserManager.FindById(User.Identity.GetUserId());

            user.PrefferedMode = model.Mode;
            UserManager.Update(user);
            return(RedirectToAction("Index", new { Message = ManageMessageId.ChangeModeSuccess }));
        }
예제 #2
0
        //
        // GET: /Manage/ChangeMode
        public ActionResult ChangeMode()
        {
            var user  = UserManager.FindById(User.Identity.GetUserId());
            var model = new ChangeModeViewModel
            {
                Mode = user.PrefferedMode
            };

            return(View(model));
        }