Exemplo n.º 1
0
        private void ShowFindContactWindowCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new ContactsListView(true);
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (view.DialogResult != null && view.DialogResult.Value && view.ViewModel.SelectedContact != null)
            {
                Member.Contact = view.ViewModel.SelectedContact;
                Member.Member.ID = Member.Contact.Contact.ID;
                IsExistingContact = true;
                IsIgnored = true;
                Member.Contact.PropertyChanged += Contact_PropertyChanged;
            }
        }
Exemplo n.º 2
0
        private void ShowFindContactWindowCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var contactList = new ContactsListView();
            contactList.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (contactList.DialogResult == null || contactList.DialogResult != true || contactList.ViewModel.SelectedContact == null) return;

            Contact = contactList.ViewModel.SelectedContact;
        }
Exemplo n.º 3
0
        private void ShowFindContactWindowCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var view = new ContactsListView();
            view.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (view.DialogResult != null && view.DialogResult.Value && view.ViewModel.SelectedContact != null)
            {
                Contact = view.ViewModel.SelectedContact;
            }
        }
        private void FindContactCommandExecuted()
        {
            RaisePropertyChanged("DisableParentWindow");

            var window = new ContactsListView();
            window.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            if (window.DialogResult == null || window.DialogResult != true || window.ViewModel.SelectedContact == null) return;

            // For database
            var eventContact = new EventContact()
            {
                ID = Guid.NewGuid(),
                EventID = _event.Event.ID,
                ContactID = window.ViewModel.SelectedContact.Contact.ID
            };

            // For event data contex
            var linkedContact = new EventContact()
            {
                ID = eventContact.ID,
                EventID = eventContact.EventID,
                Contact = window.ViewModel.SelectedContact.Contact
            };

            _event.EventContacts.Add(linkedContact);
            _eventsDataUnit.EventContactsRepository.Add(eventContact);
        }