示例#1
0
        public ActionResult AddNewAssingment(AssignmentViewModel assignment)
        {
            _opp1.AddAssignment(assignment);
            var id = assignment.UserId;
            var user = _opp1.GetTeachersCourseInfo(id);

            return View("TeacherDashboard", user);
        }
示例#2
0
        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);
        }
示例#3
0
 public void AddAssingment(AssignmentViewModel assignment)
 {
     var dueDate = DateTime.Parse(assignment.DueDate);
     db.AddNewAssignment(assignment.CourseId, assignment.AssignmentName, assignment.PossiblePoints,
         dueDate, assignment.AssignmentDescription);
 }
示例#4
0
 public void AddAssignment(AssignmentViewModel assignment)
 {
     _repo.AddAssingment(assignment);
 }