public async Task <ActionResult> GetCompetitorEditData(int competitorId)
 {
     return(Json(new
     {
         Competitor = await _competitorService.GetCompetitor(competitorId),
         DormsList = await _dormService.GetAll()
     }, JsonRequestBehavior.AllowGet));
 }
        public async Task <ActionResult> Get(int competitorId, int participationId)
        {
            var userId = Convert.ToInt32(User.Identity.Name);

            var data = new
            {
                CompetitionSport  = await _participationService.GetCompetitionSport(participationId, Convert.ToInt32(User.Identity.Name)),
                Competitor        = await _competitorService.GetCompetitor(competitorId, userId),
                StudyFields       = await _studyFieldService.GetAllAsync(),
                StudyFieldDegrees = await _studyFieldDegreeService.GetAllAsync(),
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
 public async Task <ActionResult> GetCompetitor(int competitorId)
 {
     return(Json(await _competitorService.GetCompetitor(competitorId), JsonRequestBehavior.AllowGet));
 }