private void BtnGetSuccessTraineesDay_Click(object sender, RoutedEventArgs e) { try { List <BE.Trainee> FailedTrainees = bl.getAllPassedTraineesDay(); MessageBox.Show(FailedTrainees.Count.ToString()); foreach (var item in FailedTrainees) { MessageBox.Show(item.ToString()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }