Exemplo n.º 1
0
        public ActionResult Index()
        {
            IEnumerable <TaskStateDTO> taskStateDTOs = taskStateService.GetTaskStates();
            var taskStates = Mapper.Map <IEnumerable <TaskStateDTO>, List <TaskStateViewModel> >(taskStateDTOs);

            return(View("Index", taskStates));
        }
Exemplo n.º 2
0
        public ActionResult Create()
        {
            ViewBag.TaskId  = new SelectList(taskService.GetTasks(), "TaskId", "Name");
            ViewBag.UserId  = new SelectList(userTrackService.GetUserTracks(), "UserId", "TaskName");
            ViewBag.StateId = new SelectList(taskStateService.GetTaskStates(), "StateId", "StateName");

            return(View("Create"));
        }
 public async Task <IActionResult> GetTaskStates()
 {
     return(new JsonResult(await _taskStateService.GetTaskStates()));
 }