public UpdateTherapistSubViewModel() { //saveCommand = new SaveCommand(this); //Console.WriteLine("Getterrek - " + SelectedFirstName); selectedTherapist = new string[9]; // wyciągnięcie danych z tabeli - therapists selectedTherapist = getter.InfoTherapistGetter(); SelectedIDTherapist = selectedTherapist[0]; SelectedFirstName = selectedTherapist[1]; SelectedLastName = selectedTherapist[2]; SelectedEmailTherapist = selectedTherapist[3]; SelectedPhoneTherapist = selectedTherapist[4]; SelectedNoteTherapist = selectedTherapist[5]; Console.WriteLine("W Updacie - " + SelectedFirstName); }
public void Execute(object parameter) { // wyciągnięcie danych z tabeli - patients getter = new TherapistsViewModel(); //Deklarujemy zmienną typu PatientsView selectedTherapist = getter.InfoTherapistGetter(); //SelectedIDPatient = selectedPatient[1]; MessageBoxResult result = MessageBox.Show("Czy na pewno chcesz usunąć dane terapeuty " + selectedTherapist[1] + " " + selectedTherapist[2], "Potwierdź usunięcie danych terapeuty", MessageBoxButton.OKCancel, MessageBoxImage.Warning); switch (result) { case MessageBoxResult.OK: vm.DeleteTherapist(); break; case MessageBoxResult.Cancel: break; } }