public TaskPermission(TaskRole role) { switch (role) { case TaskRole.ProjectOwner: this.Permission = TaskPermissionEnum.AddFile | TaskPermissionEnum.ManagementUser | TaskPermissionEnum.ProjectDelete | TaskPermissionEnum.TaskCreate | TaskPermissionEnum.TaskDelete | TaskPermissionEnum.TaskSetCategory | TaskPermissionEnum.TaskSetDeadline | TaskPermissionEnum.TaskSetEndDate | TaskPermissionEnum.TaskSetPriority | TaskPermissionEnum.TaskSetStartDate | TaskPermissionEnum.TaskSetStatus | TaskPermissionEnum.TaskView | TaskPermissionEnum.TreeVisibility; //TaskPermissionEnum.TaskDelete | TaskPermissionEnum.TaskAddFile | TaskPermissionEnum.TaskSetDeadline | TaskPermissionEnum.TaskSetCategory | TaskPermissionEnum.TaskSetPriority | TaskPermissionEnum.TaskSetEndDate | TaskPermissionEnum.TaskSetStartDate | TaskPermissionEnum.TaskSetStatus | TaskPermissionEnum.TaskSetCompleteness | TaskPermissionEnum.TaskUpdate | TaskPermissionEnum.TaskDelete | TaskPermissionEnum.TaskCreate; //da finire break; case TaskRole.Manager: this.Permission = TaskPermissionEnum.AddFile | TaskPermissionEnum.ManagementUser | TaskPermissionEnum.TaskCreate | TaskPermissionEnum.TaskDelete | TaskPermissionEnum.TaskSetCategory | TaskPermissionEnum.TaskSetDeadline | TaskPermissionEnum.TaskSetEndDate | TaskPermissionEnum.TaskSetPriority | TaskPermissionEnum.TaskSetStartDate | TaskPermissionEnum.TaskSetStatus | TaskPermissionEnum.TaskView | TaskPermissionEnum.TreeVisibility; break; case TaskRole.Resource: this.Permission = TaskPermissionEnum.AddFile | TaskPermissionEnum.TaskSetCompleteness | TaskPermissionEnum.TaskView | TaskPermissionEnum.TreeVisibility; break; case TaskRole.Visitor: this.Permission = TaskPermissionEnum.TaskView; break; default: this.Permission = TaskPermissionEnum.None; break; } }
public dtoAssignedTasks(dtoTaskWithPortalComm oTask, TaskPermissionEnum oTaskPermissions) { TaskId = oTask.ID; TaskName = oTask.Name; ProjectID = oTask.ProjectID; ProjectName = oTask.ProjectName; Permissions = oTaskPermissions; Status = oTask.Status; isDeleted = oTask.MetaInfo.isDeleted; Completeness = oTask.Completeness; Deadline = oTask.Deadline; }
public dtoInvolvingProjectsWithRoles(dtoTaskWithPortalComm oTask, TaskPermissionEnum oTaskPermissions, IList <TaskRole> oRoles) { // TODO: Complete member initialization TaskId = oTask.ID; TaskName = oTask.Name; ProjectID = oTask.ProjectID; ProjectName = oTask.ProjectName; Permissions = oTaskPermissions; Status = oTask.Status; isDeleted = oTask.MetaInfo.isDeleted; Completeness = oTask.Completeness; Deadline = oTask.Deadline; Roles = oRoles; }
//public dtoAssignedTasks(Task oTask, TaskRole oRole) public dtoAssignedTasks(Task oTask, TaskPermissionEnum oTaskPermissions) { TaskId = oTask.ID; TaskName = oTask.Name; if (oTask.Project != null) { ProjectID = oTask.Project.ID; ProjectName = oTask.Project.Name; } else { ProjectID = oTask.ID; ProjectName = oTask.Name; } Permissions = oTaskPermissions; Status = oTask.Status; isDeleted = oTask.MetaInfo.isDeleted; Completeness = oTask.Completeness; Deadline = oTask.Deadline; }
//public dtoAssignedTasks(Task oTask, TaskRole oRole) public dtoInvolvingProjectsWithRoles(Task oTask, TaskPermissionEnum oTaskPermissions, IList <TaskRole> oRoles) { TaskId = oTask.ID; TaskName = oTask.Name; if (oTask.Project != null) { ProjectID = oTask.Project.ID; ProjectName = oTask.Project.Name; } else { ProjectID = oTask.ID; ProjectName = oTask.Name; } Permissions = oTaskPermissions; Status = oTask.Status; isDeleted = oTask.MetaInfo.isDeleted; Completeness = oTask.Completeness; Deadline = oTask.Deadline; Roles = oRoles; }
public TaskPermission() { this.Permission = TaskPermissionEnum.None; }
public dtoTaskDetailWithPermission() { this.Permission = TaskPermissionEnum.None; this.dtoTaskDetail = new dtoTaskDetail(); }
public dtoTaskDetailWithPermission(dtoTaskDetail TaskDetail, TaskPermissionEnum Permission) { this.dtoTaskDetail = TaskDetail; this.Permission = Permission; }