public ActionResult Index()
        {
            TaskListModel model = new TaskListModel();

            model.Tasks = _taskService.GetAll();

            model.Projects    = _projectService.GetAll();
            model.TasStatuses = _taskStatusService.GetAll();
            model.Users       = _userService.GetAll();

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Create()
        {
            if (User.IsInRole("Master"))
            {
                ViewBag.UserID = new SelectList(_userService.GetAll(), "ID", "Name");
            }
            else
            {
                ViewBag.UserID = GetUserIdentityID().ToString();
            }

            ViewBag.StatusID = new SelectList(_taskStatusService.GetAll(), "ID", "Status");

            return(View());
        }
Exemplo n.º 3
0
 public async Task <ActionResult <IEnumerable <TaskStatusModel> > > GetAll()
 {
     return(Ok(await _taskStatusService.GetAll(await GetUserId(),
                                               GetPermissionId())));
 }