private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewPatientViewModel newPatientViewModel = (NewPatientViewModel)DataContext;

            if (((Button)sender).Content.Equals("Proceed"))
            {
                newPatientViewModel.saveUserAccount();
            }
            else if (((Button)sender).Content.Equals("Cancel"))
            {
                newPatientViewModel.cancelUserUpdate();
            }
        }
        private void TextBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            NewPatientViewModel newPatientViewModel = (NewPatientViewModel)DataContext;

            ((TextBox)sender).Text = newPatientViewModel.browsePhoto();
        }
 public DatabaseConnection(NewPatientViewModel newPatientViewModel)
 {
     this.newPatientViewModel = newPatientViewModel;
     createConnection();
 }