Пример #1
0
        public static Model.UserTask TranslateDTOTaskToModelUserTask(DTO.Task t)
        {
            if (t == null)
            {
                return(null);
            }

            return(new Model.UserTask
            {
                Code = t.Code,
                Comments = Mapper.TranslateDTOCommentListToModelCommentList(t.Comments),
                Completed = t.Completed,
                Control = ControlMapper.TranslateDTOControlToModelControl(t.Control),
                ControlId = t.ControlId,
                ControlCode = t.ControlCode,
                ControlSetCode = t.ControlSetCode,
                ControlSetId = t.ControlSetId,
                ControlSetTitle = t.ControlSetTitle,
                ControlTitle = t.ControlTitle,
                Created = t.Created,
                CreatedByUserId = t.CreatedByUserId,
                Description = t.Description,
                Due = t.Due,
                DueStatus = Mapper.TranslateDTODueStatusToModelDueStatus(t.DueStatus),
                Events = Mapper.TranslateDTOEventListToModelEventList(t.Events),
                Id = t.Id,
                Link = t.Link,
                RaciTeam = Mapper.TranslateDTORaciTeamToModelRaciTeam(t.RaciTeam),
                TaskDefinitionId = t.TaskDefinitionId,
                TaskState = Mapper.TranslateDTOTaskStateToModelTaskState(t.TaskState),
                Title = t.Title,
                WorkingSet = WorkingSetMapper.TranslateDTOWorkingSetToModelWorkingSet(t.WorkingSet),
                WorkingSetId = t.WorkingSetId
            });
        }