// TODO: Exercise 1: Task 5b: Handle the StudentSelected event when the user clicks a student on the Students page // Set the global context to the name of the student and call the GotoStudentProfile method to display the details of the student private void studentsPage_StudentSelected(object sender, StudentEventArgs e) { var studentName = e.Child; SessionContext.CurrentStudent = studentName; GotoStudentProfile(); }
// Handle the StudentSelected event when the user clicks a student on the Students view private void studentsPage_StudentSelected(object sender, StudentEventArgs e) { // TODO: Exercise 3: Task 3c: Set the current student in the global context to the student specified in the StudentEventArgs parameter SessionContext.CurrentStudent = e.Child; // Display the details of the current student GotoStudentProfile(); }
protected virtual void OnDisplay(StudentEventArgs e) { if (Studenter != null) { Studenter(this, e); } }
public void SendMessage(StudentEventArgs args) { var lections = _studentGrades.FindStudentGrades(); string st = _students.FindByID(args.grade.StudentId).St_Last_Name; string lt = _lecturer.FindByID(_lection.FindByID(args.grade.LectionId).LecturersId).Le_Last_Name; var notifyThreeLections = lections.Where(grades => grades.Key == st) .SelectMany(n => n, (n, k) => k.Grade).Reverse().Take(3).ToList(); var notifyAverageGrade = lections.Where(grades => grades.Key == st) .SelectMany(n => n, (n, k) => k.Grade).Average(); if (notifyThreeLections.TrueForAll(p => p.Equals(0))) { Log.MakeLog(LoggerOperations.Error, "NotImplementedException"); throw new NotImplementedException(); //Send mail! } if (notifyAverageGrade < 4) { Log.MakeLog(LoggerOperations.Error, "NotImplementedException"); //Send SMS to lt! } }
private void StudentsView_StudentSelected(object sender, StudentEventArgs e) { SessionContext.CurrentStudent = e.Student; GotoStudentProfile(); }
// TODO: Exercise 1: Task 5b: Handle the StudentSelected event when the user clicks a student on the Students page // Set the global context to the name of the student and call the GotoStudentProfile method to display the details of the student private void studentsPage_StudentSelected(object sender, StudentEventArgs e) { }
public void Display() { StudentEventArgs e = new StudentEventArgs(name, sex, ID); OnDisplay(e); }
protected virtual void OnGradeAdded(StudentEventArgs args) { AddedGrade?.Invoke(this, args); }
public void OnGradeAdded(object sourse, StudentEventArgs args) { SendMessage(args); }
// Handle the StudentSelected event when the user clicks a student on the Students view private void studentsPage_StudentSelected(object sender, StudentEventArgs e) { SessionContext.CurrentStudent = e.Child; GotoStudentPage(); }
private void ServiceDataProvider_AddStudentNotification(object sender, StudentEventArgs e) { Students.Add(e.Student); }