public Contracts.Event GetEvent(int id, string fields) { Arena.Event.EventProfile arenaEvent = new Arena.Event.EventProfile(id); if (arenaEvent == null) { throw new ResourceNotFoundException("Invalid event id"); } Contracts.EventMapper eventMapper = new Contracts.EventMapper(); return(eventMapper.FromArena(arenaEvent)); }
public Contracts.Event GetEvent(int id, string fields) { Arena.Event.EventProfile arenaEvent = new Arena.Event.EventProfile(id); if (arenaEvent == null) { throw new ResourceNotFoundException("Invalid event id"); } Contracts.EventMapper eventMapper = new Contracts.EventMapper(); return eventMapper.FromArena(arenaEvent); }
/// <summary> /// Decide whether to show the Waiting List button or not for the given event ID. /// If so, uses the first child called "Waiting List" or sibling to the event if one exists and is active. /// </summary> /// <param name="eventID">the event tag/profile ID</param> private void ProcessEvent(int eventID) { EventProfile profile = new Arena.Event.EventProfile(eventID); if (profile.RegistrationActive && profile.RegistrationLimited && profile.ProfileActiveMemberCount >= profile.RegistrationMaximumIndividuals) { Profile containsWaitingListProfile = (profile.ChildProfiles.Count > 0) ? containsWaitingListProfile = profile : containsWaitingListProfile = new Arena.Event.EventProfile(profile.ParentProfileID); Profile waitingListProfile = containsWaitingListProfile.ChildProfiles.FindByName("Waiting List"); if (waitingListProfile != null && waitingListProfile.Active) { hlWaitingList.Visible = true; hlWaitingList.Text = (ButtonTextSetting != string.Empty) ? ButtonTextSetting : profile.DescriptionLabel + " Full - Waiting List Sign-up"; hlWaitingList.NavigateUrl = string.Format("~/default.aspx?page={0}&event={1}", RegistrationPageSetting, waitingListProfile.ProfileID); } } }