/// <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 ge tall winners for event query /// </summary> /// <param name="query">the get all winners for event query</param> /// <returns>a list of all individuals who were chosen to recieve tickets for an event.</returns> public List <string> Handle(GetAllWinnersForEventQuery query) { return(eventRepository.GetAllWinnersForEvent(query.EventId)); }