public int CreateAssignment(int teacherId, string subject, string title, string exercise, DateTime date, DateTime deadline) { Assignment asg = new Assignment(); asg.Teacher = new Person(teacherId); asg.Subject = subject; asg.Title = title; asg.Exercise = exercise; asg.Date = date; asg.Deadline = deadline; asgDb = new AssignmentDb(); return asgDb.CreateAssignment(asg); }
public int CreateAssignment(int teacherId, string subject, string title, string exercise, DateTime date, DateTime deadline) { PersonCtrl usCtrl = new PersonCtrl(); Assignment ass = new Assignment(); ass.teacher = (Teacher)usCtrl.GetPerson(teacherId); ass.subject = subject; ass.title = title; ass.exercise = exercise; ass.date = date; ass.deadline = deadline; AssignmentDb assDb = new AssignmentDb(); return assDb.CreateAssignment(ass); }