public ParticipantDetailViewModel()
        {
            _participantService = new ParticipantService();

            //
            // TODO: Register for ParticipantSelectionMessage messages
            //
        }
示例#2
0
        public ParticipantDetailViewModel()
        {
            _participantService = new ParticipantService();

            //
            // TODO: Register for ParticipantSelectionMessage messages
            //
            Messenger.Default.Register <ParticipantSelectionMessage>(this, message =>
            {
                Participant p = _participantService.GetById(message.ParticipantId);
                Id            = p.Id;
                FirstName     = p.FirstName;
                LastName      = p.LastName;
                Company       = p.Company;
            }
                                                                     );
        }
示例#3
0
        public ParticipantsViewModel()
        {
            _participantService = new ParticipantService();

            var ps = new ObservableCollection <ParticipantViewModel>();

            foreach (var p in _participantService.GetAll())
            {
                ps.Add(new ParticipantViewModel
                {
                    Id        = p.Id,
                    FirstName = p.FirstName,
                    LastName  = p.LastName,
                    Company   = p.Company
                }
                       );
            }

            Participants = ps;
        }