Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 4
0
 /// <inheritdoc />
 public Task <EventInvites> UpdateEventInvites(EventInvites eventInvites)
 {
     throw new System.NotImplementedException();
 }
Esempio n. 5
0
        public async Task <EventInvitesApiResponse> EventInvites(Guid id)
        {
            EventInvites invites = await _eventAdminService.GetEventInvites(GetMemberId(), id);

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