private void LoadContents(LoadSessionAttendanceViewMessage loadSessionAttendanceViewMessage) { var candidateSessions = CandidateSessionService.GetAll().Where(d => d.SessionId == SelectedSession.Id).ToList(); CandidateWithCheckBoxDtos.Clear(); foreach (var v in CandidateService.GetAllCandidatesAndMapToCandidateWithCheckBoxDTO()) { CandidateWithCheckBoxDtos.Add(v); } foreach (var v in CandidateWithCheckBoxDtos) { if (candidateSessions.Any(d => d.CandidateId == v.Candidate.Id)) { v.IsSelected = true; } } }
private void NotifyMe(LoadSessionAttendanceViewMessage loadSessionAttendanceViewMessage) { SelectedSession = loadSessionAttendanceViewMessage.Session; LoadContents(loadSessionAttendanceViewMessage); }