Exemple #1
0
        public void OnDeclineEInvite(object sender, EventArgs e)
        {
            var          type    = (MenuItem)sender;
            EventProfile profile = (EventProfile)type.CommandParameter;
            string       current = fb.GetCurrentUser();

            fb.RemoveInvite(profile.EventID, null, current);
            int index = EventInvites.IndexOf(profile);

            EventInvites.RemoveAt(index);
            NoNotifications();
        }
Exemple #2
0
        /// <inheritdoc />
        public async Task <int> CreateEventInvites(NewEventInvites newEventInvites)
        {
            EventInvites eventInvite = new EventInvites();

            eventInvite.event_id     = newEventInvites.event_id;
            eventInvite.accepted     = newEventInvites.accepted;
            eventInvite.recipient_id = newEventInvites.recipient_id;
            eventInvite.sender_id    = newEventInvites.sender_id;
            eventInvite.invite_time  = newEventInvites.invite_time;

            _context.EventInvites.Add(eventInvite);
            await _context.SaveChangesAsync();

            return(eventInvite.event_id);
        }
Exemple #3
0
        public async void OnAcceptEInvite(object sender, EventArgs e)
        {
            var type = (MenuItem)sender;

            if (type.CommandParameter.ToString() == "LetsGo.Model.EventProfile")
            {
                EventProfile profile     = (EventProfile)type.CommandParameter;
                string       current     = fb.GetCurrentUser();
                UserProfile  currentUser = await fb.GetUserObject(current);

                fb.AcceptRequest(profile, null, currentUser);
                EventInvites.Remove(type.CommandParameter);
            }
            NoNotifications();
        }
Exemple #4
0
 /// <inheritdoc />
 public Task <EventInvites> UpdateEventInvites(EventInvites eventInvites)
 {
     throw new System.NotImplementedException();
 }
Exemple #5
0
        public async Task <EventInvitesApiResponse> EventInvites(Guid id)
        {
            EventInvites invites = await _eventAdminService.GetEventInvites(GetMemberId(), id);

            return(_mapper.Map <EventInvitesApiResponse>(invites));
        }