public override void AddWithoutCheck(Group_TeacherSubject newGroup_TeacherSubject)
        {
            HRDBContext.Group_TeacherSubjects.Add(newGroup_TeacherSubject);
            HRDBContext.SaveChanges();
            var students = from t in MainProgram.students.Get()
                           where t.@group == newGroup_TeacherSubject.@group
                           select t;

            foreach (var student in students)
            {
                MainProgram.marks.Add(new Marks(student, newGroup_TeacherSubject));
            }
        }
Esempio n. 2
0
        public override void AddWithoutCheck(Student newStudent)
        {
            newStudent.person.personRole = PersonRole.STUDENT;
            HRDBContext.Students.Add(newStudent);
            HRDBContext.SaveChanges();
            var groups = from t in MainProgram.group_teacherSubjects.Get()
                         where t.@group == newStudent.@group
                         select t;

            foreach (var group in groups)
            {
                MainProgram.marks.Add(new Marks(newStudent, group));
            }
        }
Esempio n. 3
0
 public override void AddWithoutCheck(Person item)
 {
     HRDBContext.Persons.Add(item);
     HRDBContext.SaveChanges();
 }