private void btnUpdateContact_Click(object sender, RoutedEventArgs e)
        {
            var contact = userContactViewSource.View.CurrentItem as contact;

            context.contact_types.Load();
            FormContact form = new FormContact(contact, context);

            form.ShowDialog();
            userContactViewSource.View.Refresh();
        }
        private void btnNewContact_Click(object sender, RoutedEventArgs e)
        {
            var user = userViewSource.View.CurrentItem as user;

            if (user == null)
            {
                MessageBox.Show("No user selected.");
                return;
            }
            context.contact_types.Load();
            FormContact form = new FormContact(user, context);

            form.ShowDialog();
            userContactViewSource.View.Refresh();
        }