Beispiel #1
0
        public ActionResult Get()
        {
            var userId = User.Identity.GetUserId();
            var data   = PipelineService.Query <ProjectsQueries>().With(q => q.GetByUserDto(userId));

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public ActionResult Index(bool isUpdated = false)
        {
            ViewBag.StatusMessage = isUpdated ? "Profile updated" : string.Empty;

            var userId = User.Identity.GetUserId();
            var model  = new UpdateUserCommand(PipelineService.Query(userQueries).With(q => q.GetById(userId)));

            return(View(model));
        }
        public ActionResult Put(UpdateTaskCommand command)
        {
            var userId = User.Identity.GetUserId();

            command.UserId = userId;
            PipelineService.HandleCommand(command);
            var data = PipelineService.Query <TasksQueries>().With(q => q.GetByIdDto(command.Id));

            return(Json(data));
        }
Beispiel #4
0
        public ActionResult Remove(int id)
        {
            var project = PipelineService.Query <ProjectsQueries>().With(q => q.GetById(id));

            if (project == null)
            {
                return(HttpNotFound());
            }

            return(View(project));
        }
Beispiel #5
0
        public ActionResult Edit(int id)
        {
            var project = PipelineService.Query <ProjectsQueries>().With(q => q.GetById(id));

            if (project == null)
            {
                return(HttpNotFound());
            }

            return(View(new UpdateProjectCommand()
            {
                ProjectId = project.Id,
                Color = project.Color,
                Name = project.Name,
            }));
        }
Beispiel #6
0
        public ActionResult Index(int page = 1)
        {
            var userId = User.Identity.GetUserId();

            return(View(PipelineService.Query <ProjectsQueries>().With(q => q.GetByUser(userId, page, 10))));
        }