Beispiel #1
0
        public void Update(UpdateProjectLinkInput input)
        {
            var projectId = _ganttRepository.Get().Where(u => u.Links.Any(v => v.Id == input.Id)).Select(u => u.ProjectId).FirstOrDefault();

            if (_projectHelper.HasPermission("项目进度负责人", projectId))
            {
                throw new AppCoreException("项目进度没有权限");
            }
            var link = input.MapTo <ProjectLink>();

            _linkRepository.Update(link);
        }
Beispiel #2
0
 public IActionResult Update(int id, [FromBody] UpdateProjectLinkInput input)
 {
     input.Id = id;
     _linkService.Update(input);
     return(Created("", new { id }));
 }