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); }
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); }