private void btnAddPat_Click(object sender, RoutedEventArgs e)
 {
     GlobalVars.PatientToEdit = null;
     Window w = new PatientsCardCreate();
     w.ShowDialog();
     btnRefreshPat_Click(sender, e);
 }
 private void btnEditPat_Click(object sender, RoutedEventArgs e)
 {
     GlobalVars.PatientToEdit = GlobalVars.PatientsList[dgPat.SelectedIndex];
     Window w = new PatientsCardCreate();
     w.ShowDialog();
     btnRefreshPat_Click(sender, e);
 }