コード例 #1
0
        public int SubmitHomework(int childId, int assignmentId, DateTime date, string diskName)
        {
            Homework hw = new Homework();
            hw.Child = new Person(childId);
            hw.Assignment = new Assignment(assignmentId);
            hw.Date = date;
            hw.DiskName = diskName;

            hwDb = new HomeworkDb();

            return hwDb.SubmitHomework(hw);
        }
コード例 #2
0
        public int SubmitHomework(int childId, int assignmentId, DateTime date, string diskName)
        {
            UserCtrl userCtrl = new UserCtrl();

            Homework hw = new Homework();
            hw.Child = (Child)userCtrl.GetPerson(childId);
            hw.Assignment = new Assignment(assignmentId);
            hw.Date = date;
            hw.DiskName = diskName;

            HomeworkDb hwDb = new HomeworkDb();

            return hwDb.SubmitHomework(hw);
        }