Example #1
0
        public ActionResult PartyInvites(int partyID)
        {
            var party = partyRepository.GetById(partyID);

            MethodResult result;

            if ((result = partyService.CanSeeInvites(SessionHelper.LoggedCitizen, party)).IsError)
            {
                return(RedirectBackWithError(result));
            }

            var citizens = party.PartyInvites.Select(pm => pm.Citizen.Entity).ToList();

            var vm = new PartyPendingInviteListViewModel(party, citizens);

            return(View(vm));
        }