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