Esempio n. 1
0
        private void NewBtn_Click(object sender, RoutedEventArgs e)
        {
            AddEditViewModel addEditViewModel = new AddEditViewModel();
            AddEditUser      frm = new AddEditUser(addEditViewModel);

            frm.ShowDialog();

            if (frm.DialogResult == true)
            {
                var newUser = addEditViewModel.CurrentUser;
                mainViewModel.UserList.Add(newUser);
                mainViewModel.CurrentUser = newUser;
            }
        }
Esempio n. 2
0
        public void editBtn_Click(object sender, RoutedEventArgs e)
        {
            var user = mainViewModel.CurrentUser;


            AddEditViewModel addEditViewModel = new AddEditViewModel(user);
            AddEditUser      frm = new AddEditUser(addEditViewModel);

            frm.ShowDialog();


            if (frm.DialogResult == true)
            {
            }
        }