public void GetAppointmentList() { List <Appointment> appointmentsId = appointmentManager.GetAppointmentList(); foreach (var item in appointmentsId) { AppointmentsId.Add(item); } if (appointmentsId.Count < 1) { MessageBox.Show("No Apoointments Found !"); } }