/// <summary> /// Gets list of team members who were interested in an event for the admin to see /// </summary> /// <param name="eventId">the id of the event to load ticket view for</param> /// <returns>Ticket claims info for an event</returns> public ActionResult LoadTicketGiveAwayView(int eventId) { AdminModel model = new AdminModel(); if (!AllowAccess()) { return(View(ViewNames.FailedToAuthenticate)); } model.UserLoginName = claimsHelper.GetUserNameFromClaim((ClaimsIdentity)User.Identity); GetEventByEventId eventQuery = new GetEventByEventId(eventId); model.Event = commandBus.ProcessQuery(eventQuery); GetAllWinnersForEventQuery winnersQuery = new GetAllWinnersForEventQuery(eventId); model.Event.WinnersForEvent = commandBus.ProcessQuery(winnersQuery); GetAllNonWinnersForEventQuery nonWinnersQuery = new GetAllNonWinnersForEventQuery(eventId); model.Event.NonWinnersForEvent = commandBus.ProcessQuery(nonWinnersQuery); GetTicketClaimsByEventIdQuery ticketClaimQuery = new GetTicketClaimsByEventIdQuery(eventId); model.TicketClaims = commandBus.ProcessQuery(ticketClaimQuery); return(View(ViewNames.SelectTicketWinner, model)); }
/// <summary> /// Handler for the get all non-winners for event query. /// </summary> /// <param name="query">the get all non-winners for event query</param> /// <returns>a list of emails for all individuals who raised their hand for an event but were not chosen.</returns> public List <string> Handle(GetAllNonWinnersForEventQuery query) { return(eventRepository.GetAllNonWinnersForEvent(query.EventId)); }