예제 #1
0
        // 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();
        }
예제 #2
0
 // 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();
 }
예제 #3
0
 protected virtual void OnDisplay(StudentEventArgs e)
 {
     if (Studenter != null)
     {
         Studenter(this, e);
     }
 }
예제 #4
0
        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!
            }
        }
예제 #5
0
 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)
 {
 }
예제 #7
0
        public void Display()
        {
            StudentEventArgs e = new StudentEventArgs(name, sex, ID);

            OnDisplay(e);
        }
예제 #8
0
 protected virtual void OnGradeAdded(StudentEventArgs args)
 {
     AddedGrade?.Invoke(this, args);
 }
예제 #9
0
 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();
 }
예제 #11
0
 private void ServiceDataProvider_AddStudentNotification(object sender, StudentEventArgs e)
 {
     Students.Add(e.Student);
 }