private IReadOnlyCollection <DataSetValuePair> UpdateDatasetSource() { var _sources = new List <DataSetValuePair>(); var selectedSession = ViewModelLocatorStatic.Locator.SessionModule.SelectedSession; _sources.Add(new DataSetValuePair("SessionDataset", selectedSession.Model)); var course = selectedSession.Model.Course; _sources.Add(new DataSetValuePair("CourseDataset", course)); var attendees = selectedSession.PresentCandidatesList.Select(c => c.Model); foreach (var item in attendees) { var candidates = item.Candidate; Cands.Add(candidates); } _sources.Add(new DataSetValuePair("CandidateDataset", Cands)); var absentees = selectedSession.AbsentCandidatesList.Select(c => c.Model); foreach (var item in absentees) { var candidates = item.Candidate; AbsentCands.Add(candidates); } _sources.Add(new DataSetValuePair("AbsentCandidateDataset", AbsentCands)); return(_sources); }
private IReadOnlyCollection <DataSetValuePair> UpdateDatasetSource() { _sources.Clear(); var selectedOpening = ViewModelLocatorStatic.Locator.OpeningModule.SelectedOpening; _sources.Add(new DataSetValuePair("OpeningDataset", selectedOpening.Model)); var associatedQualification = selectedOpening.Model.Qualification; _sources.Add(new DataSetValuePair("QualificationDataset", associatedQualification)); var placements = selectedOpening.Placements.Select(c => c.Model); foreach (var item in placements) { var candidate = item.Candidate; Cands.Add(candidate); } _sources.Add(new DataSetValuePair("CandidateDataset", Cands)); _sources.Add(new DataSetValuePair("PlacementDataset", placements)); return(_sources); }