Ejemplo n.º 1
0
        public static void DeleteSubject(int id)
        {
            List <Grade> grades = GradeManager.GetGradesBySubject(id);

            foreach (Grade grade in grades)
            {
                GradeManager.DeleteGrade(grade.id);
            }
            List <Lesson> lessons = LessonManager.GetLessonsBySubject(id);

            foreach (Lesson lesson in lessons)
            {
                LessonManager.DeleteLesson(lesson.day, lesson.lesson_time);
            }
            MyData.my_subjects_list.Remove(MyData.my_subjects_list.Find(x => x.id == id));
        }
Ejemplo n.º 2
0
 public static void AddGrade(Grade given_grade)
 {
     given_grade.id = GradeManager.FreeId();
     MyData.my_grades_list.Add(given_grade);
 }
Ejemplo n.º 3
0
 public void DeleteGrade()
 {
     GradeManager.DeleteGrade(this.id);
 }
Ejemplo n.º 4
0
 public void AddGrade()
 {
     this.id = GradeManager.FreeId();
     MyData.my_grades_list.Add(this);
 }