예제 #1
0
        /// <summary>
        /// Modifies project User.
        /// </summary>
        /// <returns>True if the user was modified, false otherwise.</returns>
        public bool ModifyUser(ProjectUser user)
        {
            //if (!Users.ContainsKey(user.Id))
            //    return false;

            //Users[user.Id] = user;
            return(true);
        }
예제 #2
0
 public Project(ProjectType type, string name, Guid id, ProjectUser founder)
 {
     Type = type;
     Name = name;
     DateCreated = System.DateTime.Now;
     Id = id;
     Users = new Dictionary<Guid, ProjectUser>();
     //Users[founder.Id] = founder;
 }
예제 #3
0
 public Project(ProjectType type, string name, Guid id, ProjectUser founder)
 {
     Type        = type;
     Name        = name;
     DateCreated = System.DateTime.Now;
     Id          = id;
     Users       = new Dictionary <Guid, ProjectUser>();
     //Users[founder.Id] = founder;
 }
예제 #4
0
        /// <summary>
        /// Removes user from project
        /// </summary>
        public async Task<bool> RemoveUserFromProject(Guid projectId, ProjectUser user)
        {
            if (!projects.ContainsKey(projectId))
                return false;
            bool ret = projects[projectId].RemoveUser(user);
            if (ret)
                UpdateDatabase(projects[projectId]);

            return ret;
        }
예제 #5
0
 /// <summary>
 /// Adds user to project
 /// </summary>
 public bool AddUserToProject(Guid projectId, ProjectUser user)
 {
     if (!_projects.ContainsKey(projectId))
         return false;
     
     bool ret = _projects[projectId].AddUser(user);
     if(ret)
         UpdateDatabase(_projects[projectId]);
     
     return ret;
 }
예제 #6
0
        /// <summary>
        /// Add member to project.
        /// </summary>
        /// <returns>True if the user was added, false otherwise.</returns>
        public bool AddUser(ProjectUser user)
        {
            //if (Users.ContainsKey(user.Id))
            //    return false;

            //Users[user.Id] = user;
            return true;
        }
예제 #7
0
 /// <summary>
 /// Remove member from project.
 /// </summary>
 /// <returns>True if the user was removed, false otherwise.</returns>
 public bool RemoveUser(ProjectUser user)
 {
     //return Users.Remove(user.Id);
     return false;
 }
예제 #8
0
        /// <summary>
        /// Modifies user permissions.
        /// </summary>
        /// <remarks /> New permissions are passed insed the ProjectUser
        public async Task<bool> ModifyUserPermissions(Guid projectId, ProjectUser user)
        {
            if (!projects.ContainsKey(projectId))
                return false;

            var ret = projects[projectId].ModifyUser(user);

            if (ret)
                UpdateDatabase(projects[projectId]);

            return ret;
 
        }
예제 #9
0
        /// <summary>
        /// Modifies user permissions 
        /// </summary>
        /// <remarks /> New permissions are passed insed the ProjectUser
        public bool ModifyUserPermissions(Guid projectId, ProjectUser user)
        {
            if (!_projects.ContainsKey(projectId))
                return false;
            bool ret = _projects[projectId].ModifyUser(user);
            if (ret)
                UpdateDatabase(_projects[projectId]);

            return ret;
 
        }
예제 #10
0
파일: Project.cs 프로젝트: akumetsuv/flood
 /// <summary>
 /// Remove member from project.
 /// </summary>
 /// <returns>True if the user was removed, false otherwise.</returns>
 public bool RemoveUser(ProjectUser user)
 {
     return Users.Remove(user.Id);
 }
예제 #11
0
파일: Project.cs 프로젝트: akumetsuv/flood
 /// <summary>
 /// Modifies project User.
 /// </summary>
 /// <returns>True if the user was modified, false otherwise.</returns>
 public bool ModifyUser(ProjectUser user)
 {
     if (!Users.ContainsKey(user.Id))
         return false;
     Users[user.Id] = user;
     return true;
 }
예제 #12
0
 /// <summary>
 /// Remove member from project.
 /// </summary>
 /// <returns>True if the user was removed, false otherwise.</returns>
 public bool RemoveUser(ProjectUser user)
 {
     //return Users.Remove(user.Id);
     return(false);
 }
예제 #13
0
파일: User.cs 프로젝트: aldyjepara/flood
 /// <summary>
 /// Add project to user list
 /// </summary>
 public async Task AddProject(Guid projectId, ProjectUser user)
 {
     //ProjectList[projectId] = user;
 }
예제 #14
0
파일: User.cs 프로젝트: chartly/flood
 /// <summary>
 /// Add project to user list
 /// </summary>
 public async Task AddProject(Guid projectId, ProjectUser user)
 {
     //ProjectList[projectId] = user;
 }
예제 #15
0
파일: User.cs 프로젝트: akumetsuv/flood
 /// <summary>
 /// Add project to user list
 /// </summary>
 /// <remarks/> can be  used to change user permission level(Owner, member ...) within existing project
 public void AddProject(Guid projectId, ProjectUser user)
 {
     ProjectList[projectId] = user;
 }