コード例 #1
0
 public async Task <NetResult <AddUsersProjectResponse> > RemoveUsersProject([FromBody] AddUsersProject model)
 {
     try
     {
     }catch (Exception ext)
     {
     }
     return(null);
 }
コード例 #2
0
        public async Task <NetResult <AddUsersProjectResponse> > AddUsersProject([FromBody] AddUsersProject model)
        {
            var existProject = _myProjects.GetFirst(m => m.UserId == this.UserId <string>() && model.ProjectId == m.ProjectId);

            if (existProject == null)
            {
                return(StatusCore.BadRequest);
            }
            AddUsersProjectResponse result = await _myProjects.AddUsersProject(model, existProject);

            return(result);
        }
コード例 #3
0
        public async Task <AddUsersProjectResponse> AddUsersProject(AddUsersProject model, UserProjects addUserId)
        {
            List <UserProjects> list = new List <UserProjects>();

            foreach (var i in model.UserIds)
            {
                var user = _user.Get(i);
                list.Add(AddProjectUser(user, addUserId));
            }
            return(new AddUsersProjectResponse()
            {
                UserProjects = list
            });
        }