public void GetMedieElev(object obj) { GetClassStudents_Result elev = obj as GetClassStudents_Result; if (elev != null) { var result = context.GetStudentGeneralAverage(elev.elevID); profesorContext.MedieElev = result.First().ToString(); } }
public void SetareNote(object obj) { if (obj != null) { GetClassStudents_Result elev = obj as GetClassStudents_Result; List <GetStudentGrades_Result> note = context.GetStudentGrades(elev.elevID).ToList(); ObservableCollection <GetStudentGrades_Result> result = new ObservableCollection <GetStudentGrades_Result>(); foreach (GetStudentGrades_Result nota in note) { result.Add(new GetStudentGrades_Result() { nota = nota.nota, denumire = nota.denumire }); } profesorContext.NoteElev = result; } }
public void SetareAbsente(object obj) { if (obj != null) { GetClassStudents_Result elev = obj as GetClassStudents_Result; List <GetStudentAbsence_Result> absente = context.GetStudentAbsence(elev.elevID).ToList(); ObservableCollection <GetStudentAbsence_Result> result = new ObservableCollection <GetStudentAbsence_Result>(); foreach (GetStudentAbsence_Result absenta in absente) { result.Add(new GetStudentAbsence_Result() { data = absenta.data, denumire = absenta.denumire }); } profesorContext.AbsenteElev = result; } }