public void Edit(int id, string title, byte mark, byte course, int student, int teacher)
        {
            CourseWork cw = GetCourseWork(id);

            cw.Title   = title;
            cw.Mark    = mark;
            cw.Course  = course;
            cw.Student = cont.StudentSet.Find(student);
            cw.Teacher = cont.TeacherSet.Find(teacher);

            cont.SaveChanges();
        }
        public void Add(string title, byte mark, byte course, int student, int teacher)
        {
            CourseWork cw = new CourseWork();

            cw.Title   = title;
            cw.Mark    = mark;
            cw.Course  = course;
            cw.Student = cont.StudentSet.Find(student);
            cw.Teacher = cont.TeacherSet.Find(teacher);

            cont.CourseWorkSet.Add(cw);
            cont.SaveChanges();
        }