Exemple #1
0
 private void RegisterEachUserOnEachEvent(UserServiceReference.User[] users, Event[] events)
 {
     for (int i = 0; i < events.Length; i++)
     {
         for (int j = 0; j < users.Length; j++)
         {
             var eventCompanyOwnerId = companyService.GetById(events[i].CompanyId).OwnerId;
             if (users[j].Id != eventCompanyOwnerId)
             {
                 eventService.RegisterUser(users[j].Id, events[i].Id);
             }
         }
     }
 }
Exemple #2
0
 private void _subscribeExecute(object parameter)
 {
     if (SubscribeBtnText == "Subscribe")
     {
         if (_eventService.RegisterUser(SystemUser.Instance.Id, _event.Id))
         {
             SubscribeBtnText = "UnSubscribe";
         }
     }
     else
     {
         if (_eventService.UnregisterUser(SystemUser.Instance.Id, _event.Id))
         {
             SubscribeBtnText = "Subscribe";
         }
     }
 }