Ejemplo n.º 1
0
        public ActionResult Edit(UserAllocationsViewModel viewModel)
        {
            var profile = UserProfile.GetUserProfile(viewModel.UserName);

            profile.AvailableSubmissions = viewModel.AvailableSubmissions;
            profile.Save();
            return(RedirectToAction("Index", "User"));
        }
Ejemplo n.º 2
0
        public ActionResult Edit(Guid id)
        {
            var user      = _MVCFormsUserDb.aspnet_Users.Single(u => u.UserId == id);
            var profile   = UserProfile.GetUserProfile(user.UserName);
            var viewModel = new UserAllocationsViewModel
            {
                UserId               = id,
                UserName             = user.UserName,
                AvailableSubmissions = profile.AvailableSubmissions,
                LastSubmission       = profile.LastSubmission
            };

            return(View(viewModel));
        }