Ejemplo n.º 1
0
        public EventViewModel(Guid eventId)
        {
            _eventService = new EventServiceClient();
            Event         = _eventService.GetById(eventId);

            Comments     = _eventService.GetComments(eventId).ToList();
            Participants = _eventService.GetParticipants(eventId).ToList();

            Comment   = new BaseCommand(_commentExecute, _commentCanExecute);
            Subscribe = new BaseCommand(_subscribeExecute, _subscribeCanExecute);

            if (Participants.Any(u => u.Id == SystemUser.Instance.Id))
            {
                SubscribeBtnText = "UnSubscribe";
            }
            else
            {
                SubscribeBtnText = "Subscribe";
            }
        }