public FileContentResult Download(int SolutionId) { CourseServices cs = new CourseServices(); SolutionModel model = new SolutionModel(); model = cs.GetSolution(SolutionId); FileServices fs = new FileServices(); string ContentType = fs.GetContentType(model.Extension); return File(model.Solution,ContentType,model.FileName); }
public ActionResult NoteEdit(int SolutionId) { SolutionModel solution = new SolutionModel(); CourseServices service = new CourseServices(); solution = service.GetSolution(SolutionId); return View(solution); }
public ActionResult StudentSolution(int SolutionId) { SolutionModel model = new SolutionModel(); CourseServices service = new CourseServices(); model = service.GetSolution(SolutionId); return View(model); }
public ActionResult StudentSolution(int TaskId) { CourseServices cs = new CourseServices(); UserServices us = new UserServices(); HttpCookie cookie = Request.Cookies.Get("LoggedUser"); cookie.Values.Get("Name"); cookie.Values.Get("Surname"); cookie.Values.Get("Login"); StudentModel student = new StudentModel(); student = us.GetStudent(cookie.Values.Get("Login")); SolutionModel solution = new SolutionModel(); solution = cs.GetSolution(TaskId, student); return View(solution); }