private void DeleteClick(object sender, RoutedEventArgs e) { int patientNoteId = int.Parse(((Button)sender).CommandParameter.ToString()); var patientNotesRepository = new PatientNotesRepository(EHealthCareDesktopApp.Properties.Settings.Default.UniqueIdentifier); patientNotesRepository.DeletePatientNotes(EHealthCareDesktopApp.Properties.Settings.Default.PatientID, patientNoteId); LoadPatientNotes(); }