Ejemplo n.º 1
0
        public ActionResult ChangeJoinMethod(JoinMethodEnum joinMethod, int partyID)
        {
            var party   = partyRepository.GetById(partyID);
            var citizen = SessionHelper.LoggedCitizen;

            MethodResult result;

            if ((result = partyService.CanChangeJoinMethod(citizen, party)).IsError)
            {
                return(RedirectBackWithError(result));
            }

            partyService.ChangeJoinMethod(party, joinMethod);

            AddInfo("Join method was changed!");
            return(RedirectToAction("View", new { partyID = partyID }));
        }