private void BtnSave_Click(object sender, RoutedEventArgs e) { patient = uc2ManagePatient.GetPatientInformationRegionsDatabase(_clinicianMainWindow.Patient.CPR); uc2ManagePatient.SavePatient(patient); MessageBox.Show("Patienten er gemt i databasen"); BtnSave.IsEnabled = false; }
private void BtnSave_Click(object sender, RoutedEventArgs e) { patient = uc2ManagePatient.GetPatientInformationRegionsDatabase(_clinicianMainWindow.Patient.CPR); patient.Email = TBEmail.Text; patient.MobilNummer = TBPhonenumber.Text; uc2ManagePatient.SavePatient(patient); _clinicianMainWindow.Patient = uc2ManagePatient.GetPatientInformation(patient.CPR); MessageBox.Show("Patienten er gemt i databasen"); BtnSave.IsEnabled = false; }
private void BtOK_Click(object sender, RoutedEventArgs e) { string cpr = TbCPRnumber.Text; _clinicianMainWindow.LoginOK = false; _clinicianMainWindow.RegionLoginOK = false; if (true)//(TbCPRnumber.Text.Length == 11 && TbCPRnumber.Text != " ") { if (uc2ManagePatient.CheckCPRClinicDatabase(cpr)) { _clinicianMainWindow.LoginOK = true; Close(); _clinicianMainWindow.Patient.CPR = cpr; } else if (uc2ManagePatient.GetPatientInformationRegionsDatabase(cpr) != null) { _clinicianMainWindow.RegionLoginOK = true; Close(); _clinicianMainWindow.Patient.CPR = cpr; } else { _clinicianMainWindow.LoginOK = false; _clinicianMainWindow.RegionLoginOK = false; string message = "Ugyldigt PCPR"; string title = "Fejl"; MessageBoxImage error = MessageBoxImage.Error; MessageBox.Show(message, title, MessageBoxButton.OK, error); } } else { string message = "Ugyldigt PCPR"; string title = "Fejl"; MessageBoxImage error = MessageBoxImage.Error; MessageBox.Show(message, title, MessageBoxButton.OK, error); } }