예제 #1
0
 public HttpStatusCodeResult InviteFriends(InviteFriendsViewModel model)
 {
     var profile = _profileService.GetProfile(User.Identity.GetUserId().ToLong());
     var ev = _eventService.GetEvent(model.EventId);
     _eventService.InviteUsersToEvent(profile.User, ev, model.SelectedFriendIds);
     return new HttpStatusCodeResult(HttpStatusCode.OK);
 }
예제 #2
0
 // Partial View
 public async Task<ActionResult> FriendsList(long eventId)
 {
     var profile = _profileService.GetProfile(User.Identity.GetUserId().ToLong());
     var friends = _facebookService.GetFriends(profile.User);
     var ev = _eventService.GetEvent(eventId);
     
     var model = new InviteFriendsViewModel
     {
         UserProfile = profile,
         Friends = await friends,
         Invitations = ev.Invitations.ToList(),
         EventId = eventId
     };
     return PartialView("InviteFriendsPartial", model);
 
 }