Exemple #1
0
        // Details button click even handler
        // Opens new window with information regarding patient

        // For Scheduling Grid
        private void DetailsViewSchedulingGrid_Click(object sender, RoutedEventArgs e)
        {
            PatientAppointment SelectedPatient = ((FrameworkElement)sender).DataContext as PatientAppointment;

            // creating and displaying a new scheduling window based on the object selected
            Window SchedulingWindow = new PatientScheduling(SelectedPatient);

            this.Hide();
            SchedulingWindow.ShowDialog();
            this.RefreshGrids();
            this.Show();
        }
Exemple #2
0
        // For Appointments Grid
        private void DetailsViewAppointmentsGrid_Click(object sender, RoutedEventArgs e)
        {
            DataRow Selected = (((FrameworkElement)sender).DataContext as DataRowView).Row;

            PatientAppointment SelectedPatient = Query.GetAppointment(Convert.ToInt32(Selected["ID"]));

            // creating and displaying a new scheduling window based on the object selected
            Window SchedulingWindow = new PatientScheduling(SelectedPatient);

            this.Hide();
            SchedulingWindow.ShowDialog();
            this.RefreshGrids();
            this.Show();
        }
        private void Butt_Click(object sender, RoutedEventArgs e)
        {
            Button s = sender as Button;

            if (s.Content.ToString() == "Patient Ruben")
            {
                Random random = new Random(DateTime.Now.Second);

                TestDesign.PatientAppointment patient = TestDesign.PatientAppointment.Data[random.Next(0, TestDesign.PatientAppointment.Data.Count)];
                patient.PatientInfo.Name = "Patiemt Ruben";
                PatientScheduling t = new PatientScheduling(patient);
                t.ShowDialog();
            }
            else if (s.Content.ToString() == "Patient Marina")
            {
                Random random = new Random(DateTime.Now.Second);

                TestDesign.PatientAppointment patient = TestDesign.PatientAppointment.Data[random.Next(0, TestDesign.PatientAppointment.Data.Count)];
                patient.PatientInfo.Name = "Patiemt Marina";
                PatientScheduling t = new PatientScheduling(patient);
                t.ShowDialog();
            }
        }