Exemple #1
0
        private void FindPatient(object sender, RoutedEventArgs e)
        {
            PatientRegistry patientRegistry = new PatientRegistry();

            if (string.IsNullOrEmpty(txtName.Text.Trim()) || string.IsNullOrEmpty(txtSurname.Text.Trim()))
            {
                MessageBox.Show("Enter data");
                return;
            }

            PatientsPage.instance.lstPatients.Items.Clear();
            PatientsPage.instance.lstPatients.ItemsSource = patientRegistry.Find(txtName.Text.Trim(), txtSurname.Text.Trim());
            this.Close();
        }
Exemple #2
0
        public static ScheduleDTO CreateEnroll(int doctorId, int patientId, DateTime date, string time)
        {
            PatientRegistry registry = new PatientRegistry();
            PatientDTO      patient  = registry.Find(patientId);

            ScheduleDTO enroll = new ScheduleDTO
            {
                PatientId = patientId,
                DoctorId  = doctorId,
                Date      = date,
                Time      = time,
                Addition  = "Patient: " + patient.ToString()
            };

            return(enroll);
        }