public IActionResult Index() { var model = new DisplayIndexViewModel { Members = _member.GetAllMembers(true), Session = _session.GetActiveSession(), Ballot = _ballot.GetActiveOrLast(), Votes = _vote.GetAll(_ballot.GetActiveOrLast()), MembersBySeat = _seatService.MembersBySeat(), BallotId = _ballot.GetBallotsThisSession(_session.GetActiveSession()) }; return(View(model)); }
public HomeController(ILogger <HomeController> logger, IMemberRegister memberRegister, ICouncilSession session, IBallot ballot, IMember member, IVote vote, ISeatService seatService, IConfiguration configuration) { _configuration = configuration; _memberRegister = memberRegister; _session = session; _ballot = ballot; _member = member; _vote = vote; _logger = logger; _seatService = seatService; model = new HomeIndexViewModel { Session = _session.GetActiveSession(), Ballot = _ballot.GetActiveOrLast() }; }
public AdminController(ILogger <AdminController> logger, ICouncilSession session, IBallot ballot, IMember member, IMemberRegister memberRegister, IConfiguration configuration, IHostingEnvironment hostingEnvironment, ISeatService seatService) { _logger = logger; _session = session; _ballot = ballot; _member = member; _memberRegister = memberRegister; _seatService = seatService; _configuration = configuration; _env = hostingEnvironment; model = new AdminIndexViewModel { ActiveOrLastBallot = _ballot.GetActiveOrLast(), Members = _member.GetAllMembers(true), CouncilSession = _session.GetActiveSession(), Register = _memberRegister.GetStatusAllMember(), BallotsThisSession = _ballot.GetBallotsThisSession(_session.GetActiveSession()) }; }