Ejemplo n.º 1
0
        public IActionResult OnGet(int?talk_id)
        {
            if (talk_id == null)
            {
                return(NotFound());
            }

            Talk = ApiClient.GetTalkResponseAsync(talk_id.Value).Result;

            if (Talk == null)
            {
                return(NotFound());
            }

            if (IdentityClient.GetUserOwnershipAsync(new UserOwnership {
                UserId = User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier).Value, ConferenceId = ApiClient.GetConferenceFromTalkID(Talk.ID).Result
            }).Result == null)
            {
                return(base.NotFound());
            }

            personList = Talk.ParsePersonsString;

            return(Page());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?session_id)
        {
            if (session_id == null)
            {
                return(NotFound());
            }

            SessionResponse = ApiClient.GetSessionResponseAsync(session_id.Value).Result;

            if (SessionResponse == null)
            {
                return(NotFound());
            }

            conference = ApiClient.GetConferenceAsync(SessionResponse.ConferenceID).Result;

            if (conference == null)
            {
                return(NotFound());
            }

            if (IdentityClient.GetUserOwnershipAsync(new UserOwnership {
                UserId = User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier).Value, ConferenceId = conference.ID
            }).Result == null)
            {
                return(base.NotFound());
            }


            return(Page());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> OnGetAsync(int?session_id)
        {
            if (session_id == null)
            {
                return(NotFound());
            }

            SessionResponse = ApiClient.GetSessionResponseAsync(session_id.Value).Result;

            if (SessionResponse == null)
            {
                return(NotFound());
            }

            Conference = ApiClient.GetConferenceAsync(SessionResponse.ConferenceID).Result;

            if (IdentityClient.GetUserOwnershipAsync(new UserOwnership {
                UserId = User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier).Value, ConferenceId = Conference.ID
            }).Result == null)
            {
                return(NotFound());
            }

            if (SessionResponse.Hosts != null && SessionResponse.Hosts.Any())
            {
                int i = 0;
                foreach (var person in SessionResponse.Hosts)
                {
                    if (i == 0)// remove the case when the list beggins with ", {person}"
                    {
                        HostsList += $"{person.FullName}";
                        i          = 1;
                    }
                    else
                    {
                        HostsList = $"{HostsList}, {person.FullName}";
                    }
                }
            }


            return(Page());
        }
Ejemplo n.º 4
0
        public IActionResult OnGet(int?conference_id)
        {
            if (conference_id is null)
            {
                return(NotFound());
            }

            if (IdentityClient.GetUserOwnershipAsync(new UserOwnership {
                UserId = User.FindFirst(System.Security.Claims.ClaimTypes.NameIdentifier).Value, ConferenceId = conference_id.Value
            }).Result == null)
            {
                return(NotFound());
            }

            SessionResponse = new SessionResponse();

            Conference = ApiClient.GetConferenceAsync(conference_id.Value).Result;

            return(Page());
        }