public bool ShowNewPersonDialog()
        {
            using (var view = new PersonViewForm())
            {
                var vm = new PersonViewModel(view);
//                view.ViewModel = vm;
//                view.InitializeUIBindings(vm);
                view.ShowDialog();
                Person = vm.Model;
                return(vm.Model != null);
            }
        }
예제 #2
0
        public PersonController(int?dossierId)
        {
            this.dossierId = dossierId;

            this.GetPersonList();
            this.personViewForm = new PersonViewForm();

            // Configure delegates
            this.personViewForm.SelectWithID = this.ShowWithID;
            this.personViewForm.Save         = this.Save;
            this.personViewForm.SaveNew      = this.SaveNew;
            this.personViewForm.Delete       = this.Delete;
            this.personViewForm.SetPersonList(this.personList, "naam", "Id");
        }