예제 #1
0
        private void btnSelectParents_Click(object sender, EventArgs e)
        {
            var list = new MarriageRepository().FindAll(fetchExtensions: true);
            var form = new SelectorUI <Marriage>(list);

            form.ShowDialog();
            var selectedItem = form.SelectedItem;

            if (selectedItem != null)
            {
                this.ParentsMarriage = selectedItem;
            }
            UpdateRelationshipsView();
        }
예제 #2
0
        private void lnkSelectAndEditPerson_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            // first select the person:
            var persons = new PersonRepository().FindAll();
            var form    = new GUI.SelectorUI <Person>(persons);

            form.ShowDialog();
            var selectedPerson = form.SelectedItem;

            // then edit this person:
            var personUI = new GUI.PersonUI(selectedPerson);

            personUI.Show();
        }
예제 #3
0
        private void btnSelectPartner_Click(object sender, EventArgs e)
        {
            var list = new PersonRepository().FindAll();
            var form = new SelectorUI <Person>(list);

            form.ShowDialog();
            var selectedItem = form.SelectedItem;

            if (selectedItem != null)
            {
                this.PersonMarriage = new Marriage(this.Person, selectedItem);
            }
            UpdateRelationshipsView();
        }