예제 #1
0
 public dtoReallocateTA(TaskAssignment oTA)
 {
     ID                = System.Guid.NewGuid();
     Completeness      = oTA.Completeness;
     TaskID            = oTA.Task.ID;
     Role              = oTA.TaskRole;
     PersonID          = oTA.AssignedUser.Id;
     PersonSurnameName = oTA.AssignedUser.SurnameAndName;
     isDeleted         = oTA.MetaInfo.isDeleted;
 }
예제 #2
0
 public dtoTaskAssignment(TaskAssignment oTaskAssignment)
 {
     this.ID           = oTaskAssignment.ID;
     this.AssignedUser = oTaskAssignment.AssignedUser.SurnameAndName;
     this.Role         = oTaskAssignment.TaskRole.ToString();
     this.Completeness = oTaskAssignment.Completeness;
     this.isDeleted    = oTaskAssignment.MetaInfo.isDeleted;
     //this.AuthorOfAssignment = AuthorOfAssignment;
     //this.DateOfAssignment = DateOfAssignment;
 }
예제 #3
0
        public dtoTaskDetail(TaskAssignment oTaskAssignment)
        {
            TaskName = oTaskAssignment.Task.Name;

            TaskAssignmentID = oTaskAssignment.ID;
            TaskID           = oTaskAssignment.Task.ID;
            if (oTaskAssignment.Task.Level != 0)
            {
                ProjectName = oTaskAssignment.Project.Name;
                TaskWBS     = oTaskAssignment.Task.TaskWBSstring + oTaskAssignment.Task.TaskWBSindex;
            }
            else
            {
                ProjectName = oTaskAssignment.Task.Name;
                TaskWBS     = "";
            }

            Priority = oTaskAssignment.Task.Priority;
            Status   = oTaskAssignment.Task.Status;
            if (oTaskAssignment.Task.Community != null)
            {
                CommunityName = oTaskAssignment.Task.Community.Name;
            }
            else
            {
                CommunityName = "";
            }
            Description = oTaskAssignment.Task.Description;
            Category    = "";
            StartDate   = oTaskAssignment.Task.StartDate;
            EndDate     = oTaskAssignment.Task.EndDate;
            Deadline    = oTaskAssignment.Task.Deadline;
            if (oTaskAssignment.TaskRole == TaskRole.Resource || oTaskAssignment.TaskRole == TaskRole.Customized_Resource)
            {
                PersonalCompleteness = oTaskAssignment.Completeness;
            }
            else
            {
                PersonalCompleteness = -1;
            }

            TaskCompleteness = oTaskAssignment.Task.Completeness;
            Notes            = oTaskAssignment.Task.Notes;
            isDeleted        = oTaskAssignment.Task.MetaInfo.isDeleted;
        }
예제 #4
0
        public dtoTaskWithPortalComm(TaskAssignment oTaskAss, String portalName)
        {
            this.ID           = oTaskAss.Task.ID;
            this.Name         = oTaskAss.Task.Name;
            this.MetaInfo     = oTaskAss.Task.MetaInfo;
            this.Completeness = oTaskAss.Task.Completeness;
            this.StartDate    = oTaskAss.Task.StartDate;
            this.EndDate      = oTaskAss.Task.EndDate;
            this.Deadline     = oTaskAss.Task.Deadline;
            this.Level        = oTaskAss.Task.Level;
            this.Priority     = oTaskAss.Task.Priority;
            this.Status       = oTaskAss.Task.Status;
            this.Category     = oTaskAss.Task.Category;

            //this.Project = oTask.Project;
            this.TaskParent = oTaskAss.Task.TaskParent;

            if (oTaskAss.Project != null)
            {
                ProjectID   = oTaskAss.Project.ID;
                ProjectName = oTaskAss.Project.Name;
            }
            else
            {
                ProjectID   = oTaskAss.Task.ID;
                ProjectName = oTaskAss.Task.Name;
            }

            if (oTaskAss.Task.Community != null && oTaskAss.Task.Community.Id > 0)
            {
                this.CommunityName = oTaskAss.Task.Community.Name;
                this.CommunityId   = oTaskAss.Task.Community.Id;
            }
            else
            {
                this.CommunityName = portalName;
                this.CommunityId   = 0;
            }
        }