Exemple #1
0
 //GET: Candidates/Create
 public async Task <IActionResult> Create()
 {
     if (await _electionService.VerifyElectionOpenAsync())
     {
         return(RedirectToAction("Index"));
     }
     ViewData["PoliticPartyId"] = new SelectList(_politicPartyService.GetPoliticParties().Where(p => p.IsActive == true), "Id", "Name");
     ViewData["PositionId"]     = new SelectList((await _positionService.GetPositionsAsync()).Where(p => p.IsActive == true), "Id", "Name");
     return(View());
 }
Exemple #2
0
 // GET: PoliticParties
 public async Task <IActionResult> Index()
 {
     return(View(await _politicPartyService.GetPoliticParties().ToListAsync()));
 }