private void Edit_Button_Click(object sender, RoutedEventArgs e) { if (VisitDataGrid.SelectedItems.Count == 1) { AddEditVisit win = new AddEditVisit((IAddEditVisitParent)this, (List <PATIENT>)service.getPatients(), (List <DOCTOR>)service.getDoctors(), (VISIT)VisitDataGrid.SelectedItem); win.ShowDialog(); } else { MessageBox.Show("Error. Choose single visit!"); } LoadData(); }
private void Add_Button_Click(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Are you already a client?", "Add Box", MessageBoxButton.YesNoCancel); switch (result) { case MessageBoxResult.Yes: AddEditVisit win1 = new AddEditVisit((IAddEditVisitParent)this, (List <PATIENT>)service.getPatients(), (List <DOCTOR>)service.getDoctors()); win1.ShowDialog(); break; case MessageBoxResult.No: AddEditPatient win2 = new AddEditPatient(this); win2.ShowDialog(); break; case MessageBoxResult.Cancel: break; } }
private void New_MenuItem_Click(object sender, RoutedEventArgs e) { AddEditVisit win1 = new AddEditVisit((IAddEditVisitParent)this, (List <PATIENT>)service.getPatients(), (List <DOCTOR>)service.getDoctors()); win1.ShowDialog(); }