private void LoadAppointments() { try { var appointmentDataRepository = new AppointmentDataRepository(UniqueIdentifier); listViewAppointments.ItemsSource = appointmentDataRepository.GetAllAppointmentData(PatientId); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public List<AppointmentViewModel> GetViewModel() { var providerDataRepository = new ProviderDataRepository(); var apponitmentDataRepository = new AppointmentDataRepository(Guid.Parse(uniqueGuid)); var appointments = apponitmentDataRepository.GetAllAppointmentData(this.patientId); foreach (var appointment in appointments) { appointmentViewModelList.Add(new AppointmentViewModel { StartDate = appointment.StartDate, EndDate = appointment.EndDate, Notes = appointment.Notes, ProviderName = providerDataRepository.GetProviderById(appointment.ProviderId), Purpose = appointment.Purpose, SpecialtyName = apponitmentDataRepository.GetSpecialtiyName(appointment.SpecialtyId), Status = appointment.Status, Type = appointment.Type }); } return appointmentViewModelList; }