public ListForObjects GetAllHomeworksByID(int assignmentId)
 {
     HomeworkDb hwDb = new HomeworkDb();
     UserCtrl userCtrl = new UserCtrl();
     AssignmentCtrl assgnmentCtrl = new AssignmentCtrl();
     ListForObjects l = hwDb.GetAllHomeworksById(assignmentId);
     ListForObjects list = new ListForObjects();
     foreach (Homework hw in l.Asl)
     {
         hw.Child = (Child)userCtrl.GetPerson(hw.Child.Id);
         //hw.Assignment = assgnmentCtrl.GetAssignmentById(hw.Assignment.Id);
         list.Asl.Add(hw);
     }
     return list;
 }
        public ListForObjects GetAllHomeworksByID(int assignmentId)
        {
            HomeworkDb     hwDb          = new HomeworkDb();
            PersonCtrl     userCtrl      = new PersonCtrl();
            AssignmentCtrl assgnmentCtrl = new AssignmentCtrl();
            ListForObjects l             = hwDb.GetAllHomeworksById(assignmentId);
            ListForObjects list          = new ListForObjects();

            foreach (Homework hw in l.Asl)
            {
                hw.Child = (Child)userCtrl.GetPerson(hw.Child.Id);
                //hw.Assignment = assgnmentCtrl.GetAssignmentById(hw.Assignment.Id);
                list.Asl.Add(hw);
            }
            return(list);
        }
        public List<Assignment> GetAllAssignmentsByTeacher(int teacherId)
        {
            AssignmentCtrl asgCtrl = new AssignmentCtrl();

            return asgCtrl.GetAllAssignmentsByTeacher(teacherId);
        }
        public List<Assignment> GetAllAssignments()
        {
            AssignmentCtrl asgCtrl = new AssignmentCtrl();

            return asgCtrl.GetAllAssignments();
        }
        //All the methods that deal with Assignment objects
        public int CreateAssignment(int teacherId, string subject, string title, string exercise, DateTime date, DateTime deadline)
        {
            AssignmentCtrl asgCtrl = new AssignmentCtrl();

            return asgCtrl.CreateAssignment(teacherId, subject, title, exercise, date, deadline);
        }
        public ListForObjects GetAllAssignmentsForTeacherById(int teacherId)
        {
            AssignmentCtrl asCtrl = new AssignmentCtrl();

            return asCtrl.GetAllAssignmentsByTeacherId(teacherId);
        }