示例#1
0
        public ActionResult CandidateToCongress()
        {
            var citizen = SessionHelper.CurrentEntity.Citizen;

            if (citizen == null)
            {
                return(RedirectToHome());
            }

            if (partyService.CanCandidateToCongress(citizen, citizen.PartyMember.Party) == false)
            {
                return(RedirectToHome());
            }

            partyService.CandidateToCongress(citizen);
            AddInfo("You sucessfuly candidated to congress! <br/> Now you need to wait for approval from party president.");
            return(RedirectToAction("View", new { partyID = citizen.PartyMember.PartyID }));
        }