Exemple #1
0
        public static SuperTask GetSuperTask(TaskMainDTO task)
        {
            GetTrackerServicesSoapClient service      = new GetTrackerServicesSoapClient();
            ICollection <TaskMainDTO>    matchedTasks = service.GetMatchedTasks(task.TaskID, task.Source, task.TokenID);

            return(new SuperTask(matchedTasks));
        }
Exemple #2
0
        private static ITask TaskMainDtoToTaskMain(TaskMainDTO taskMainDTO)
        {
            TaskMain taskMain = new TaskMain();

            taskMain.TaskID        = taskMainDTO.TaskID;
            taskMain.TargetVersion = taskMainDTO.TargetVersion;
            taskMain.Summary       = taskMainDTO.Summary;
            taskMain.SubtaskType   = taskMainDTO.SubtaskType;
            taskMain.Status        = taskMainDTO.Status;
            taskMain.Project       = taskMainDTO.Project;
            taskMain.Product       = taskMainDTO.Product;
            taskMain.Priority      = taskMainDTO.Priority;
            taskMain.Source        = taskMainDTO.Source;
            taskMain.LinkToTracker = taskMainDTO.LinkToTracker;
            taskMain.Estimation    = taskMainDTO.Estimation;
            taskMain.Description   = taskMainDTO.Description;
            taskMain.CreatedDate   = taskMainDTO.CreatedDate;
            taskMain.CreatedBy     = taskMainDTO.CreatedBy;
            taskMain.Comments      = taskMainDTO.Comments;
            taskMain.TokenID       = taskMainDTO.TokenID;

            if (taskMainDTO.TaskParent != null)
            {
                taskMain.TaskParent = TaskMainDtoToTaskMain(taskMainDTO.TaskParent);
            }

            if (taskMainDTO.Assigned != null)
            {
                taskMain.Assigned = UserDtoToUser(taskMainDTO.Assigned);
            }

            return(taskMain);
        }
        private static ITask TaskMainDtoToTaskMain(TaskMainDTO taskMainDTO)
        {
            TaskMain taskMain = new TaskMain();

            taskMain.TaskID = taskMainDTO.TaskID;
            taskMain.TargetVersion = taskMainDTO.TargetVersion;
            taskMain.Summary = taskMainDTO.Summary;
            taskMain.SubtaskType = taskMainDTO.SubtaskType;
            taskMain.Status = taskMainDTO.Status;
            taskMain.Project = taskMainDTO.Project;
            taskMain.Product = taskMainDTO.Product;
            taskMain.Priority = taskMainDTO.Priority;
            taskMain.Source = taskMainDTO.Source;
            taskMain.LinkToTracker = taskMainDTO.LinkToTracker;
            taskMain.Estimation = taskMainDTO.Estimation;
            taskMain.Description = taskMainDTO.Description;
            taskMain.CreatedDate = taskMainDTO.CreatedDate;
            taskMain.CreatedBy = taskMainDTO.CreatedBy;
            taskMain.Comments = taskMainDTO.Comments;
            taskMain.TokenID = taskMainDTO.TokenID;

            if (taskMainDTO.TaskParent != null)
            {
                taskMain.TaskParent = TaskMainDtoToTaskMain(taskMainDTO.TaskParent);
            }

            if (taskMainDTO.Assigned != null)
            {
                taskMain.Assigned = UserDtoToUser(taskMainDTO.Assigned);
            }

            return taskMain;
        }
Exemple #4
0
        private static bool ValuesAreTheSame(TaskMainDTO[] values)
        {
            int indexFirstVal = 0;

            while (values[indexFirstVal] == null && indexFirstVal < values.Length - 2)
            {
                indexFirstVal++;
            }
            TaskMainDTO firstVal = values[indexFirstVal];

            for (int indexSecondVal = indexFirstVal + 1; indexSecondVal < values.Length; indexSecondVal++)
            {
                TaskMainDTO secondVal = values[indexSecondVal];
                if (firstVal != null && secondVal != null &&
                    !string.Equals(firstVal.TaskID, secondVal.TaskID, StringComparison.CurrentCultureIgnoreCase))
                {
                    return(false);
                }
            }
            return(true);
        }
Exemple #5
0
        private static bool ValuesAreTheSame(TaskMainDTO[] values)
        {
            int indexFirstVal = 0;
            while (values[indexFirstVal] == null && indexFirstVal < values.Length - 2)
            {
                indexFirstVal++;
            }
            TaskMainDTO firstVal = values[indexFirstVal];

            for (int indexSecondVal = indexFirstVal + 1; indexSecondVal < values.Length; indexSecondVal++)
            {
                TaskMainDTO secondVal = values[indexSecondVal];
                if (firstVal != null && secondVal != null &&
                    !string.Equals(firstVal.TaskID, secondVal.TaskID, StringComparison.CurrentCultureIgnoreCase))
                {
                    return false;
                }
            }
            return true;
        }
Exemple #6
0
 private static string GetSingleValue(TaskMainDTO[] values)
 {
     string singleValue = new SuperTask().multipleValuesMessage;
     if (ValuesAreTheSame(values))
     {
         singleValue = null;
         foreach (TaskMainDTO task in values)
         {
             if (task != null)
             {
                 singleValue = task.TaskID;
                 break;
             }
         }
     }
     return singleValue;
 }
Exemple #7
0
        public static SuperTask GetSuperTask(TaskMainDTO task)
        {
            GetTrackerServicesSoapClient service = new GetTrackerServicesSoapClient();
            ICollection<TaskMainDTO> matchedTasks = service.GetMatchedTasks(task.TaskID, task.Source, task.TokenID);

            return new SuperTask(matchedTasks);
        }