Exemplo n.º 1
0
        private void BtnDisplay_Click(object sender, RoutedEventArgs e)
        {
            grdAppointment.ItemsSource = "";
            try
            {
                appointmentListXML = new AppointmentList();
                appointmentListXML = xmlObject.ReadFromXMLFile();
                appointmentListXML.Sort();
                //grdAppointment.ItemsSource = appointmentListXML;
                DisplayAppointment.Clear();
                for (int i = 0; i < appointmentListXML.Count(); i++)
                {
                    Appointment appt = appointmentListXML[i];
                    DisplayAppointment.Add(appt);
                }

                grdAppointment.ItemsSource = displayAppointment;
            }
            catch (IOException ioe)
            {
                Console.WriteLine(ioe.ToString());
            }
            finally
            {
            }
        }
Exemplo n.º 2
0
 private void BtnDisplay_Click(object sender, RoutedEventArgs e)
 {
     saveList.Clear();
     ReadFromXML();
     Applist.Clear();
     for (int i = 0; i < saveList.Count(); i++)
     {
         Patient   patient    = saveList[i].Patient;
         MyPatient newPatient = new MyPatient();
         newPatient.Age              = patient.Age;
         newPatient.Time             = patient.Time;
         newPatient.Gender           = patient.Gender;
         newPatient.MedicalCondition = patient.MedicalCondition;
         newPatient.CtXray           = patient.CtXray;
         newPatient.Treatment        = patient.Treatment;
         newPatient.CreditCard       = patient.CreditCard;
         Applist.Add(newPatient);
         TimeList.Remove(patient.Time);
     }
     MyGrid.ItemsSource = Applist;
 }