Beispiel #1
0
        public ActionResult AddSupportToGoal()
        {
            Guid goalIdToken = (Guid)TempData["goToken"];
            var  goalId      = securityTokenService.GetActualId(goalIdToken);

            supportService.CreateSupport(new Support()
            {
                UserId = User.Identity.GetUserId(), GoalId = goalId, SupportedDate = DateTime.Now
            });
            securityTokenService.DeleteSecurityToken(goalIdToken);
            MuhendislerBuradaSessionFacade.Remove(MuhendislerBuradaSessionFacade.JoinGroupOrGoal);
            return(RedirectToAction("Index", "Home"));
        }
Beispiel #2
0
        public ActionResult AddGroupUser()
        {
            Guid      groupIdToken = (Guid)TempData["grToken"];
            var       groupId      = securityTokenService.GetActualId(groupIdToken);
            GroupUser newGroupUser = new GroupUser()
            {
                UserId  = User.Identity.GetUserId(),
                GroupId = groupId,
                Admin   = false
            };

            groupUserService.CreateGroupUser(newGroupUser, groupInvitationService);
            securityTokenService.DeleteSecurityToken(groupIdToken);
            MuhendislerBuradaSessionFacade.Remove(MuhendislerBuradaSessionFacade.JoinGroupOrGoal);
            return(RedirectToAction("Index", "Home"));
        }