//Konstruktor wyświetla dane w zależności od wyboru public AppointmentTab(int ViewType) { InitializeComponent(); List <Appointment> AppointmentList = AppointmentRepo.GetAllAppoitments(); if (ViewType == 1) { AppointmentListView.ItemsSource = AppointmentList; } else if (ViewType == 2) { AppointmentListView.ItemsSource = Lists.TodayAppointments(); } else if (ViewType == 3) { AppointmentListView.ItemsSource = Lists.PatientAppointments(); } else if (ViewType == 4) { AppointmentListView.ItemsSource = Lists.DoctorAppointments(); } AppointmentListView.Items.Refresh(); }