Ejemplo n.º 1
0
        // GET: Entities
        public async Task <IActionResult> Index(TGetEntitiesQuery query)
        {
            MapFilterToViewData(query);

            var entities = await HandlerDispatcher.ExecuteQueryAsync(query);

            return(View(entities));
        }
        public async Task <IActionResult> Index()
        {
            var viewModel = await _handlerDispatcher.ExecuteQueryAsync(new GetUserDetailsQuery());

            viewModel.StatusMessage = StatusMessage;

            await FillViewDataAsync(viewModel);

            return(View(viewModel));
        }
Ejemplo n.º 3
0
        private async Task FillViewDataAsync()
        {
            var dataForRegistration = await _handlerDispatcher.ExecuteQueryAsync(new GetDataForRegistrationQuery());

            ViewData["CityId"]      = new SelectList(dataForRegistration.Cities, "Id", "Name");
            ViewData["StudyPlaces"] = dataForRegistration.StudyPlaces;
        }
        // GET: Emails
        public async Task <IActionResult> Index(GetEmailsQuery query)
        {
            ViewData["Email"]   = query.Email;
            ViewData["Sended"]  = query.Sended;
            ViewData["Message"] = query.Message;

            var emails = await _handlerDispatcher.ExecuteQueryAsync(new GetEmailsQuery());

            return(View(emails));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Index()
        {
            var actualContests = await _handlerDispatcher.ExecuteQueryAsync(new GetContestsForHomeQuery { IsArchived = false });

            return(View(actualContests));
        }
        public async Task <IActionResult> Details(int id, ContestParticipantFilter filter) //TODO как переименовать парамерт в contestId? Какой-то маппинг надо подставить
        {
            ViewData["ParticipantName"] = filter.ParticipantName;
            ViewData["TrainerName"]     = filter.TrainerName;
            ViewData["ManagerName"]     = filter.ManagerName;
            ViewData["City"]            = filter.City;
            ViewData["Area"]            = filter.Area;
            ViewData["StudyPlace"]      = filter.StudyPlace;
            ViewData["Status"]          = filter.Status;

            var viewModel = await HandlerDispatcher.ExecuteQueryAsync(new GetContestDetailsQuery { ContestId = id, Filter = filter });

            return(View(viewModel));
        }