예제 #1
0
        // GET: ProjectTasks
        public ActionResult Index()
        {
            if (coursesRepository.IsTeacherInAnyCourse(User.Identity.GetUserId(), User.IsInRole("Administrator")))
            {
                ViewBag.IsTeacher = true;
            }
            if (User.IsInRole("Administrator"))
            {
                return(View(projectTasksRepository.GetAllProjectTasks()));
            }

            return(View(projectTasksRepository.GetAllProjectTasksForUserId(User.Identity.GetUserId())));
        }
예제 #2
0
 public IEnumerable <ProjectTask> Get()
 {
     return(ProjectTasksRepository.GetAllProjectTasks());
 }
 public IEnumerable <ProjectTaskViewModel> Get()
 {
     return(repository.GetAllProjectTasks());
 }