public void DisplayList(object obj) { List <Patient> patients = patientManager.DisplayPatientList(); foreach (var item in patients) { Patients.Add(item); } if (patients.Count < 1) { MessageBox.Show("No Patient exists !"); } }