public ActionResult AddNewAssingment(AssignmentViewModel assignment) { _opp1.AddAssignment(assignment); var id = assignment.UserId; var user = _opp1.GetTeachersCourseInfo(id); return View("TeacherDashboard", user); }
public ActionResult AddAssingment(int id) { ViewBag.courseId = id; var course = _opp1.GetThisCourse(id); var courseName = course.CourseName; var courseId = course.CourseId; var userId = course.UserId; var thisAssignment = new AssignmentViewModel(); ViewBag.CourseName = courseName; ViewBag.UserId = userId; thisAssignment.CourseId = courseId; return View(thisAssignment); }
public void AddAssingment(AssignmentViewModel assignment) { var dueDate = DateTime.Parse(assignment.DueDate); db.AddNewAssignment(assignment.CourseId, assignment.AssignmentName, assignment.PossiblePoints, dueDate, assignment.AssignmentDescription); }
public void AddAssignment(AssignmentViewModel assignment) { _repo.AddAssingment(assignment); }