private void Cancel(object sender, RoutedEventArgs e)
        {
            MainWindow       main = Application.Current.MainWindow as MainWindow;
            appointmentsList appointmentsListPage = new appointmentsList();

            main.frame.Navigate(appointmentsListPage);
        }
        private void Delete(object sender, RoutedEventArgs e)
        {
            db.appointments.Remove((appointments)dgAppointments.SelectedItem);
            db.SaveChanges();
            MainWindow       main = Application.Current.MainWindow as MainWindow;
            appointmentsList appointmentsListPage = new appointmentsList();

            main.frame.Navigate(appointmentsListPage);
        }
        private void AppointmentsList_Click(object sender, RoutedEventArgs e)
        {
            appointmentsList appointmentsListPage = new appointmentsList();

            frame.Navigate(appointmentsListPage);
        }