private void ChkBxToggle_Checked(object sender, RoutedEventArgs e) { if ((bool)ChkBxToggle.IsChecked) { LVPatients.ItemsSource = DbGet.GetPatientList(true); } else { LVPatients.ItemsSource = DbGet.GetPatientList(false); } }
private void SaveJournal_Click(object sender, RoutedEventArgs e) { Journal journal = new Journal(); journal.Text = TBXInputText.Text; journal.AddedAt = DateTime.Now; journal.PostJournal(patientId, journal); PagePatient pp = new PagePatient(DbGet.GetPatient(patientId)); NavigationService.Navigate(pp); }
private void BtnShow_Click(object sender, RoutedEventArgs e) { DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is ListViewItem)) { dep = VisualTreeHelper.GetParent(dep); } if (dep == null) { return; } Patient patient = (Patient)LVPatients.ItemContainerGenerator.ItemFromContainer(dep); PagePatient pp = new PagePatient(DbGet.GetPatient(patient.Id)); NavigationService.Navigate(pp); }
public void Dispose() { DbGet.Dispose(); DbPut.Dispose(); }
private void CancelJournal_Click(object sender, RoutedEventArgs e) { PagePatient pp = new PagePatient(DbGet.GetPatient(patientId)); NavigationService.Navigate(pp); }